8224018: test/jdk/java/net/ipv6tests/{Tcp,Udp}Test.java assume IPv4 is available
authoraeubanks
Wed, 15 May 2019 17:13:57 -0700
changeset 54903 5a211ee83bf1
parent 54902 d1717e05e51c
child 54904 c1143a0d4e22
8224018: test/jdk/java/net/ipv6tests/{Tcp,Udp}Test.java assume IPv4 is available Reviewed-by: dfuchs, chegar Contributed-by: aeubanks@google.com
test/jdk/java/net/ipv6tests/TcpTest.java
test/jdk/java/net/ipv6tests/UdpTest.java
--- 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;