[Mono-dev] Tests for ParseRouteInfo

Ben Woods woodsb02 at gmail.com
Thu Jan 15 13:58:02 UTC 2015


Mono is not able to get the system gateway address on Mac OSX or BSD when
performing GetIPProperties on an a NetworkInterface. This is due to the
mono class libraries solely utilising the /proc/net/route file, which is
only available on Linux.

I have submitted a pull request to fix this here:
https://github.com/mono/mono/pull/1404

The last comment on the pull request is that the code looks good, but it
would be nice to have a test added to the regression test suite. As I
understand it, the test code would reside
in mcs/class/System/Test/System.Net.NetworkInformation.

What do you think the test would look like? Seeing as mono does not support
setting the routing table, only reading it, it is difficult to assert that
the default gateway would be.

Perhaps simply that the code executes without error, regardless of the
result, even if it is empty (it is possible for a system to not have a
default route, after all).

Thoughts?

--
From: Benjamin Woods
woodsb02 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20150115/c0d67317/attachment.html>


More information about the Mono-devel-list mailing list