[ipv6] Regarding 8220673: Add test library support for determining platform IP support

Arthur Eubanks aeubanks at google.com
Wed May 1 22:21:28 UTC 2019


Sorry for the delay, but here's the next revision:
http://cr.openjdk.java.net/~aeubanks/8220673/webrev.01

The list of tests modified was found by searching for "preferIPv4Stack" in
the tests. The only one I didn't touch was test/jdk/sun/net/sdp/sanity.sh,
which is a shell test, and is Solaris-only.
For most tests, all I did was add
IPSupport.skipIfCurrentConfigurationIsInvalid(). Some of them also had
custom implementations for detecting if IPv6 was available, so I replaced
those with the new IPSupport version.
Also added a missing "@test" to test/jdk/java/net/Socket/RST.java.

Again, I made sure that the only time the test is skipped
with IPSupport.skipIfCurrentConfigurationIsInvalid() is when IPv4 is not
available (with LD_PRELOAD) and when java.net.preferIPv4Stack is true.

There are still tests that fail/timeout under the LD_PRELOAD that
intercepts and rejects IPv4 calls to getifaddrs(), setsockopt(), and
socket(), but those will be fixed in the future, likely with changes to the
JDK itself.

On Tue, Apr 16, 2019 at 2:14 PM Arthur Eubanks <aeubanks at google.com> wrote:

> > 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.
>>
> I lied, it worked on our JDK which has some IPv6 patches, not the upstream
> JDK. I think to properly test this, first I need to upstream a tiny portion
> of the patches we have to the JDK. I'll file a bug and send out a patch.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190501/8fd17505/attachment.html>


More information about the net-dev mailing list