Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8361422

java/net/NetworkInterface/IPv4Only.java fail on OL IPv6 only configured environments

XMLWordPrintable

    • linux_oracle

      We run jdk_net and nio_networkchannel tests on IPv6 only environments.
      For linux it is not possible to fully disable IPv4, as such the env are configured as only IPv6

      test fails because IPSupport.hasIPv4() returns
      add additional check to IPSupport.isIPv4Configured() and IPSupport.isIPv6Configured() and amend logic to choose IPv6 test block

      The windows environment failures should be addressed in another bug

                 try {
                      NetworkInterface.getNetworkInterfaces();
                      throw new RuntimeException("NetworkInterface.getNetworkInterfaces() should throw SocketException");
                  } catch (SocketException expected) {
                      System.out.println("caught expected exception: " + expected);
                  }

                  try {
                      NetworkInterface.networkInterfaces();
                      throw new RuntimeException("NetworkInterface.networkInterfaces() should throw SocketException");
                  } catch (SocketException expected) {
                      System.out.println("caught expected exception: " + expected);
                  }

      the setting of -Djava.net.preferIPv4Stack=true is expecting the filtering NetworkInterfaces without IPv4 configuration ... BUT is that reasonable semantics

            ssachkov Serhiy Sachkov
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: