RFR[8233989]: Create an IPv4 version of java/net/MulticastSocket/SetLoopbackMode.java

2019-11-13 Thread Patrick Concannon

Hi,


Could someone please review my fix for issue JDK-8233989 'Create an IPv4 
version of java/net/MulticastSocket/SetLoopbackMode.java' ?


This fix circumvents the issue by adding a new SetLoopbackModeIPv4 test 
that calls SetLoopbackMode in IPv4 only mode, and runs only if IPv4 is 
enabled.


bug: https://bugs.openjdk.java.net/browse/JDK-8233989
webrev: http://cr.openjdk.java.net/~pconcannon/8233989/webrevs/webrev.00/



Kind regards,

Patrick



Re: RFR[8233989]: Create an IPv4 version of java/net/MulticastSocket/SetLoopbackMode.java

2019-11-13 Thread Daniel Fuchs

Thanks for taking care of that Patrick!

The call to IPSupport.throwSkippedExceptionIfNonOperational();
should ensure that the new test will be skipped if IPv4 is not
available on the machine, so that looks good to me!

best regards,

-- daniel

On 13/11/2019 11:18, Patrick Concannon wrote:

Hi,


Could someone please review my fix for issue JDK-8233989 'Create an IPv4 
version of java/net/MulticastSocket/SetLoopbackMode.java' ?


This fix circumvents the issue by adding a new SetLoopbackModeIPv4 test 
that calls SetLoopbackMode in IPv4 only mode, and runs only if IPv4 is 
enabled.


bug: https://bugs.openjdk.java.net/browse/JDK-8233989
webrev: http://cr.openjdk.java.net/~pconcannon/8233989/webrevs/webrev.00/



Kind regards,

Patrick





RFR[8233860]: java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF

2019-11-13 Thread Patrick Concannon

Hi,


Could someone please review my fix for issue JDK-8233860 
'java/net/SocketOption/AfterClose.java test incorrectly handles 
IP_MULTICAST_IF' ?


The test, AfterClose.java, makes a call to setOption() after a socket 
has been closed to verify that a SocketException is thrown correctly. 
However, the test uses an invalid value (boolean) for the 
IP_MULTICAST_IF option invalidating the test.
This fix corrects this error, and passes valid input for the 
IP_MULTICAST_IF option (i.e. a NetworkInterface) ensuring that the test 
behaves as expected.


bug: https://bugs.openjdk.java.net/browse/JDK-8233860
webrev: 
http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.00/ 





Kind regards,

Patrick



Re: RFR[8233860]: java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF

2019-11-13 Thread Daniel Fuchs

Looks good to me Patrick!

best regards,

-- daniel

On 13/11/2019 16:12, Patrick Concannon wrote:

Hi,


Could someone please review my fix for issue JDK-8233860 
'java/net/SocketOption/AfterClose.java test incorrectly handles 
IP_MULTICAST_IF' ?


The test, AfterClose.java, makes a call to setOption() after a socket 
has been closed to verify that a SocketException is thrown correctly. 
However, the test uses an invalid value (boolean) for the 
IP_MULTICAST_IF option invalidating the test.
This fix corrects this error, and passes valid input for the 
IP_MULTICAST_IF option (i.e. a NetworkInterface) ensuring that the test 
behaves as expected.


bug: https://bugs.openjdk.java.net/browse/JDK-8233860
webrev: 
http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.00/ 





Kind regards,

Patrick





Re: RFR[8233860]: java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF

2019-11-13 Thread Alan Bateman



On 13/11/2019 16:12, Patrick Concannon wrote:


Hi,


Could someone please review my fix for issue JDK-8233860 
'java/net/SocketOption/AfterClose.java test incorrectly handles 
IP_MULTICAST_IF' ?


The test, AfterClose.java, makes a call to setOption() after a socket 
has been closed to verify that a SocketException is thrown correctly. 
However, the test uses an invalid value (boolean) for the 
IP_MULTICAST_IF option invalidating the test.
This fix corrects this error, and passes valid input for the 
IP_MULTICAST_IF option (i.e. a NetworkInterface) ensuring that the 
test behaves as expected.


bug: https://bugs.openjdk.java.net/browse/JDK-8233860
webrev: 
http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.00/ 



Looks okay although I assume supportsMulticast should be catching 
SocketException rather that Throwable.


-Alan


Re: RFR[8233860]: java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF

2019-11-13 Thread Patrick Concannon

Hi Alan,


Thanks for your feedback.

My mistake. I've changed that now in the webrev below.

http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.01/


Kind regards,

Patrick

On 13/11/2019 16:53, Alan Bateman wrote:



On 13/11/2019 16:12, Patrick Concannon wrote:


Hi,


Could someone please review my fix for issue JDK-8233860 
'java/net/SocketOption/AfterClose.java test incorrectly handles 
IP_MULTICAST_IF' ?


The test, AfterClose.java, makes a call to setOption() after a socket 
has been closed to verify that a SocketException is thrown correctly. 
However, the test uses an invalid value (boolean) for the 
IP_MULTICAST_IF option invalidating the test.
This fix corrects this error, and passes valid input for the 
IP_MULTICAST_IF option (i.e. a NetworkInterface) ensuring that the 
test behaves as expected.


bug: https://bugs.openjdk.java.net/browse/JDK-8233860
webrev: 
http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.00/ 



Looks okay although I assume supportsMulticast should be catching 
SocketException rather that Throwable.


-Alan


Re: RFR[8233860]: java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF

2019-11-13 Thread Alan Bateman




On 13/11/2019 17:41, Patrick Concannon wrote:


Hi Alan,


Thanks for your feedback.

My mistake. I've changed that now in the webrev below.

http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.01/


Looks good.


RE: RFR[8233860]: java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF

2019-11-13 Thread Vyom Tewari26
Hi Patric,
 
Change looks ok to me, one minor bit i will suggest you to use "List.of()" in place of "new ArrayList<>();".
Thanks,
Vyom
 
- Original message -From: Patrick Concannon Sent by: "net-dev" To: Alan Bateman , OpenJDK Network Dev list Cc:Subject: [EXTERNAL] Re: RFR[8233860]: java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IFDate: Wed, Nov 13, 2019 11:13 PM 
Hi Alan,
Thanks for your feedback.My mistake. I've changed that now in the webrev below.http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.01/Kind regards,
Patrick
On 13/11/2019 16:53, Alan Bateman wrote:
 
On 13/11/2019 16:12, Patrick Concannon wrote:

Hi,Could someone please review my fix for issue JDK-8233860 'java/net/SocketOption/AfterClose.java test incorrectly handles IP_MULTICAST_IF' ?The test, AfterClose.java, makes a call to setOption() after a socket has been closed to verify that a SocketException is thrown correctly. However, the test uses an invalid value (boolean) for the IP_MULTICAST_IF option invalidating the test.This fix corrects this error, and passes valid input for the IP_MULTICAST_IF option (i.e. a NetworkInterface) ensuring that the test behaves as expected.
bug: https://bugs.openjdk.java.net/browse/JDK-8233860webrev: http://cr.openjdk.java.net/~pconcannon/8233860/webrevs/webrev.00/  Looks okay although I assume supportsMulticast should be catching SocketException rather that Throwable.-Alan