8224018: test/jdk/java/net/ipv6tests/{Tcp,Udp}Test.java assume IPv4 is available
Reviewed-by: dfuchs, chegar
Contributed-by: aeubanks@google.com
--- a/test/jdk/java/net/ipv6tests/TcpTest.java Thu May 16 17:06:53 2019 +0100
+++ b/test/jdk/java/net/ipv6tests/TcpTest.java Wed May 15 17:13:57 2019 -0700
@@ -60,6 +60,10 @@
public static void main (String[] args) throws Exception {
checkDebug(args);
+ if (ia4addr == null) {
+ System.out.println ("No IPV4 addresses: exiting test");
+ return;
+ }
if (ia6addr == null) {
System.out.println ("No IPV6 addresses: exiting test");
return;
--- a/test/jdk/java/net/ipv6tests/UdpTest.java Thu May 16 17:06:53 2019 +0100
+++ b/test/jdk/java/net/ipv6tests/UdpTest.java Wed May 15 17:13:57 2019 -0700
@@ -70,6 +70,10 @@
public static void main (String[] args) throws Exception {
checkDebug(args);
+ if (ia4addr == null) {
+ System.out.println ("No local IPv4 addresses: exiting now");
+ return;
+ }
if (ia6addr == null) {
System.out.println ("No local IPv6 addresses: exiting now");
return;