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

2019-05-09 Thread Alan Bateman
On 09/05/2019 12:02, Chris Hegarty wrote: : I agree that the method name could be improved. It’s really: “skip test if cannot create a minimally-operational IPv4 or IPv6 socket" Some concrete method name suggestions ( more welcome ): - IPSupport::skipTestIfNonOperational - IPSupport::ski

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

2019-05-09 Thread Chris Hegarty
Alan, > On 9 May 2019, at 07:22, Alan Bateman wrote: > > On 08/05/2019 12:02, Chris Hegarty wrote: >> : >>> >>> New webrev: http://cr.openjdk.java.net/~aeubanks/8220673/webrev.03/ >> >> : >> >> P.S. adding nio-dev since there are a few tests in that area >> being updated. > Thanks for forward

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

2019-05-08 Thread Alan Bateman
On 08/05/2019 12:02, Chris Hegarty wrote: : New webrev: http://cr.openjdk.java.net/~aeubanks/8220673/webrev.03/ : P.S. adding nio-dev since there are a few tests in that area being updated. Thanks for forwarding. IPSupports.skipIfConcurrentConfigurationIsInvalid is a bit strange and I thi

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

2019-05-08 Thread Daniel Fuchs
On 08/05/2019 17:02, Arthur Eubanks wrote: http://cr.openjdk.java.net/~aeubanks/8220673/webrev.04/ LGTM. best regards, -- daniel

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

2019-05-08 Thread Daniel Fuchs
Hi Arthur, On 07/05/2019 19:35, Arthur Eubanks wrote: When you said "double checking" I thought it was some terminology related to security managers (e.g. "double checked locking") :P Oh - sorry I was not clear enough. I looked through all the tests I modified for any references to security

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

2019-05-08 Thread Chris Hegarty
Arthur, On 07/05/2019 19:35, Arthur Eubanks wrote: ... With help from Chris's references ([1]), I added a test with a policy file that grants IPSupport permission to listen/resolve localhost:0, and read the java.net.preferIPv4Stack system property. Without either permission, the test fails

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

2019-05-07 Thread Martin Buchholz
TIL that we had tests with security policies so fine-grained that test libraries were granted more permissions than other test code. grant codeBase "file:${test.classes}/../../../../test/lib/-" { Given that, I agree with Chris and Daniel that test library code should include the same doPrivileged

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

2019-05-07 Thread Daniel Fuchs
Hi Arthur, On 07/05/2019 00:50, Arthur Eubanks wrote: [...] IIUC, a security manager that disallows everything would prevent the code in IPSupport from working at all, and there's no way to get around it with doPrivileged() since IPSupport and System.getProperty() are not in the same protectio

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

2019-05-07 Thread Chris Hegarty
> On 6 May 2019, at 23:55, Martin Buchholz wrote: > > > > On Thu, May 2, 2019 at 2:28 AM Daniel Fuchs > wrote: > > 1. IPSupport needs to read system properties, attempts > to bind sockets etc... I wonder how that might interact > with tests that use a

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

2019-05-06 Thread Martin Buchholz
On Thu, May 2, 2019 at 2:28 AM Daniel Fuchs wrote: > > 1. IPSupport needs to read system properties, attempts > to bind sockets etc... I wonder how that might interact > with tests that use a security manager, as some of these > operations may throw a SecurityException. > Maybe so

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

2019-05-02 Thread Daniel Fuchs
Hi Arthur, On the surface, this looks good. However I have a concern about two things: 1. IPSupport needs to read system properties, attempts to bind sockets etc... I wonder how that might interact with tests that use a security manager, as some of these operations may throw a SecurityE

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

2019-05-01 Thread Arthur Eubanks
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

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

2019-04-16 Thread Chris Hegarty
Arthur, > On 16 Apr 2019, at 00:37, Arthur Eubanks 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 th

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

2019-04-11 Thread Roger Riggs
Hi, If you need different @requires for different runs, there is a jtreg feature to define separate tests using separate comment blocks. /*...  *@requires x  *@run ...  */ /*  * @requires !x  * @run ...  */ $.02, Roger On 04/11/2019 12:01 PM, Chris Hegarty wrote: Arthur, Daniel, On 10 Apr

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

2019-04-11 Thread Chris Hegarty
Daniel, > On 11 Apr 2019, at 17:15, Daniel Fuchs wrote: > > On 11/04/2019 17:01, Chris Hegarty wrote: >> Yes, this is a good point. What’s nice about this is that there is just >> one body of code that provides the functionality ( and it is all in >> Java, not native). I'm interested to see how

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

2019-04-11 Thread Daniel Fuchs
On 11/04/2019 17:01, Chris Hegarty wrote: Yes, this is a good point. What’s nice about this is that there is just one body of code that provides the functionality ( and it is all in Java, not native). I'm interested to see how this performs in Arthur's experiments, and I need to do a little more

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

2019-04-11 Thread Chris Hegarty
Arthur, Daniel, > On 10 Apr 2019, at 21:39, Arthur Eubanks wrote: > > Here's a prototype webrev to see if the approach is okay with you. If it > looks good, I'll continue with the remaining tests I can find. (should I > start a new thread for the webrev?) > > http://cr.openjdk.java.net/~aeuba

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

2019-04-11 Thread Daniel Fuchs
Hi Arthur, This looks like a good cleanup to me. On 10/04/2019 21:39, Arthur Eubanks wrote: Here's a prototype webrev to see if the approach is okay with you. If it looks good, I'll continue with the remaining tests I can find. (should I start a new thread for the webrev?) http://cr.openjdk.

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

2019-04-09 Thread Chris Hegarty
Arthur, > On 1 Apr 2019, at 21:52, Arthur Eubanks wrote: > > There are a bunch of tests with "-Djava.net.preferIPv4Stack=true", which > should clearly fail in an IPv6 only environment. Right. > Would skipping these when IPv4 is not supported be okay? Yes, I believe so, but we will need to ch

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

2019-04-01 Thread Arthur Eubanks
There are a bunch of tests with "-Djava.net.preferIPv4Stack=true", which should clearly fail in an IPv6 only environment. Would skipping these when IPv4 is not supported be okay? I see that some tests with "-Djava.net.preferIPv6Addresses=true" will pass even if the IPv6 part of the test failed. O

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

2019-03-29 Thread Chris Hegarty
Arthur, Several tests require the presence of either: 1) IPv4, or 2) IPv6, or 3) IPv4&IPv6. A test library utility class could provide such. Here is a rough idea about how to determine Internet Protocol support. http://cr.openjdk.java.net/~chegar/8220673/webrev.00/ It might be enough to exper