6898234: (dc) Multicast tests fail on OpenSolaris with vboxnet0 adapter
authoralanb
Tue, 10 Nov 2009 10:51:31 +0000
changeset 4231 655529411ad5
parent 4230 e208dda74f1c
child 4232 16c44c226bdc
6898234: (dc) Multicast tests fail on OpenSolaris with vboxnet0 adapter Reviewed-by: chegar
jdk/test/ProblemList.txt
jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java
--- a/jdk/test/ProblemList.txt	Mon Nov 09 21:32:16 2009 -0800
+++ b/jdk/test/ProblemList.txt	Tue Nov 10 10:51:31 2009 +0000
@@ -719,12 +719,6 @@
 # Triggers a hotspot crash on Fedora 9 32bit -server and Windows X64  samevm
 sun/nio/cs/TestUTF8.java					generic-all
 
-# Fails on OpenSolaris, IllegalArgumentException: Source address is a wildcard
-java/nio/channels/DatagramChannel/BasicMulticastTests.java	generic-all
-
-# Fails on OpenSolaris, RuntimeException: Expected message not recieved
-java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java generic-all
-
 # Solaris sparc, socket timeout
 java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh generic-all
 
--- a/jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java	Mon Nov 09 21:32:16 2009 -0800
+++ b/jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java	Tue Nov 10 10:51:31 2009 +0000
@@ -73,22 +73,22 @@
 
             List<InetAddress> addrs = Collections.list(nif.getInetAddresses());
             for (InetAddress addr: addrs) {
-                if (addr instanceof Inet4Address) {
-                    List<InetAddress> list = ip4Interfaces.get(nif);
-                    if (list == null) {
-                        list = new LinkedList<InetAddress>();
+                if (!addr.isAnyLocalAddress()) {
+                    if (addr instanceof Inet4Address) {
+                        List<InetAddress> list = ip4Interfaces.get(nif);
+                        if (list == null) {
+                            list = new LinkedList<InetAddress>();
+                        }
+                        list.add(addr);
+                        ip4Interfaces.put(nif, list);
+                    } else if (addr instanceof Inet6Address) {
+                        List<InetAddress> list = ip6Interfaces.get(nif);
+                        if (list == null) {
+                            list = new LinkedList<InetAddress>();
+                        }
+                        list.add(addr);
+                        ip6Interfaces.put(nif, list);
                     }
-                    list.add(addr);
-                    ip4Interfaces.put(nif, list);
-                }
-                if (addr instanceof Inet6Address) {
-                    List<InetAddress> list = ip6Interfaces.get(nif);
-                    if (list == null) {
-                        list = new LinkedList<InetAddress>();
-                    }
-                    list.add(addr);
-                    ip6Interfaces.put(nif, list);
-
                 }
             }
         }