RFR: 8285671: java/nio/channels/etc/PrintSupportedOptions.java and java/nio/channels/DatagramChannel/AfterDisconnect.java are failing [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Wed Apr 27 14:15:50 UTC 2022


On Wed, 27 Apr 2022 12:10:13 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> Hi,
>> 
>> Can I get the following fix reviewed please? JDK-8284890 was pushed yesterday and is causing failures on older versions of macOS that do not support the option. The fix here is to check at initialization time whether it is supported before adding it to the list of supported options. The error causes the new test and two existing ones to fail. I will remove the two tests from the problem list separately.
>> 
>> Thanks,
>> Michael.
>
> Michael McMahon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   updated test

src/jdk.net/macosx/native/libextnet/MacOSXSocketOptions.c line 209:

> 207:         return JNI_FALSE;
> 208:     }
> 209:     fd = socket(AF_INET6, SOCK_DGRAM, 0);

So if IPv6 is not supported on the machine, won't that result on reporting that IP don't fragment is unsupported? Same question for line 201, but for IPv6 only machines?

test/jdk/jdk/net/ExtendedSocketOption/DontFragmentTest.java line 44:

> 42: 
> 43:     public static void main(String[] args) throws IOException {
> 44:         isMacos = System.getProperty("os.name").equals("Mac OS X");

I believe there's a test library class that does that. I never remember what the os.name is supposed to look like.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8419


More information about the net-dev mailing list