[ipv6] Regarding 8220673: Add test library support for determining platform IP support
Chris Hegarty
chris.hegarty at oracle.com
Tue Apr 16 08:54:49 UTC 2019
Arthur,
> On 16 Apr 2019, at 00:37, Arthur Eubanks <aeubanks at google.com> wrote:
>
> While looking through some of the tests, I noticed that there is jdk.test.lib.NetworkConfiguration which has methods like "isIPv6Available". It seems much more comprehensive than what is in the proposed IPSupport. Although the methods are not static and require a `NetworkConfiguration nc = NetworkConfiguration.probe()`.
As the original author of NetworkConfiguration, its intent is to provide
a consistent set of network interfaces that may be used by tests. For
example, filtering out of certain problematic platform specific
tunnelling interfaces, etc, can be done in a single place ( rather than
scatter throughout individual tests ).
Currently NetworkConfiguration knows nothing of the IP related system
properties. What IPSupport provides is somewhat orthogonal to that of
NetworkConfiguration. Of course their functionality could be merged into
a single class, but I find the separation of concerns, network interface
versus socket functionality, makes the code more readable and
understandable.
> Regarding trusting the IPSupport, I have checked to make sure that it's reasonable. It correctly throws a jtreg.SkippedException when preferIPv4Stack is true and IPv4 is not available, and leaves the other cases alone. This was tested with an LD_PRELOAD that returns an error on `socket()`, `setsockopt()`, and `getifaddrs()` on IPv4 addresses. Under a typical dual stack configuration it doesn't throw anything. This was a good idea, thanks Daniel.
Indeed. And thanks for verify its behaviour.
Let’s move ahead with this and see how far it can get us.
-Chris.
More information about the net-dev
mailing list