RFR: JDK-8313873: java/net/DatagramSocket/SendReceiveMaxSize.java fails on AIX due to small default RCVBUF size and different IPv6 Header interpretation [v3]
Alan Bateman
alanb at openjdk.org
Fri Aug 11 14:26:30 UTC 2023
On Thu, 10 Aug 2023 11:36:42 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> test/jdk/java/nio/channels/DatagramChannel/SendReceiveMaxSize.java line 162:
>>
>>> 160: if (receiver.getOption(SO_RCVBUF) < capacity+28){
>>> 161: throw new Error("system value " + receiver.getOption(SO_RCVBUF) + " for UDP receive buffer too small to hold capacity " + capacity);
>>> 162: }
>>
>> Can you re-format this to avoid this wildly long time, it makes it impossible to look at the changes side-by-side.
>
> FWIW - I was concerned that this new check here might make the test fail on other platforms (e.g. Windows/Linux...) I ran the test through our CI and didn't see any new error.
The check is a bit dubious as the spec does not guarantee that SO_RCVBUF limits the size of the datagram that can be received. As I read it, you want to check the default value of SO_RCVBUF, in which case the check should be after receiver.bind. Also this is a TestNG test so it should be "fail" rather than throwing an error I think.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15209#discussion_r1291396880
More information about the nio-dev
mailing list