Hi,

On Sun, 2008-11-16 at 00:05 +0100, Mark Wielaard wrote:
> I made sure all needed services are enabled on
> icedtea.classpath.org/developer.classpath.org and set those as defaults
> in TestEnv for the net/nio tests that need to contact hosts. Using
> icedtea for remote_host and developer for far_host is somewhat
> arbitrary, but at least these hosts are public.
> 
> I also made sure the cname.sh test uses the far_host to do its tests
> instead of a hardcoded one. And I changed the SocketChannel LocalAddress
> and Shutdown tests to use the echo service. Since the echo service
> already has to be enabled for other tests and I didn't want to open up a
> telnet port.
> [...]
> All the tests using TestEnv in make check-jdk target now PASS for me.
> 
> Note that TestEnv hasn't been forward ported from jdk6 to jdk7. So I
> haven't yet pushed this patch upstream to the jdk7 net/nio lists.

The jdk6 and jdk7 environments are still somewhat dissimilar, but thanks
to Andrew Hughes the patches have been ported to make sure they also
work on jdk7 out of the box by default using just public hosts without
the need to change anything in your test environment locally. Attached
is the patch against jdk7.

I also filed (the jdk6 version) in bugzilla so it doesn't get forgotten:
https://bugs.openjdk.java.net/show_bug.cgi?id=100066

Thanks,

Mark
diff -Nru openjdk.orig/jdk/test/java/nio/channels/SocketChannel/LocalAddress.java openjdk/jdk/test/java/nio/channels/SocketChannel/LocalAddress.java
--- openjdk.orig/jdk/test/java/nio/channels/SocketChannel/LocalAddress.java	2008-11-06 08:45:01.000000000 +0000
+++ openjdk/jdk/test/java/nio/channels/SocketChannel/LocalAddress.java	2008-11-17 14:46:05.000000000 +0000
@@ -40,7 +40,7 @@
         InetAddress bogus = InetAddress.getByName("0.0.0.0");
         SocketChannel sc = SocketChannel.open();
         InetSocketAddress saddr = new InetSocketAddress(
-            InetAddress.getByName(TestUtil.HOST), 23);
+            InetAddress.getByName(TestUtil.HOST), 7);
 
         //Test1: connect only
         sc.connect(saddr);
diff -Nru openjdk.orig/jdk/test/java/nio/channels/SocketChannel/Shutdown.java openjdk/jdk/test/java/nio/channels/SocketChannel/Shutdown.java
--- openjdk.orig/jdk/test/java/nio/channels/SocketChannel/Shutdown.java	2008-11-06 08:45:01.000000000 +0000
+++ openjdk/jdk/test/java/nio/channels/SocketChannel/Shutdown.java	2008-11-17 14:45:53.000000000 +0000
@@ -35,7 +35,7 @@
 
     public static void main(String args[]) throws Exception {
         InetSocketAddress sa = new InetSocketAddress(
-                                InetAddress.getByName(TestUtil.HOST), 23);
+                                InetAddress.getByName(TestUtil.HOST), 7);
         SocketChannel sc = SocketChannel.open(sa);
         boolean before = sc.socket().isInputShutdown();
         sc.socket().shutdownInput();
diff -Nru openjdk.orig/jdk/test/java/nio/channels/TestUtil.java openjdk/jdk/test/java/nio/channels/TestUtil.java
--- openjdk.orig/jdk/test/java/nio/channels/TestUtil.java	2008-11-17 14:43:22.000000000 +0000
+++ openjdk/jdk/test/java/nio/channels/TestUtil.java	2008-11-17 14:44:24.000000000 +0000
@@ -36,9 +36,9 @@
 
     // Test hosts used by the channels tests - change these when
     // executing in a different network.
-    public static final String HOST = "javaweb.sfbay.sun.com";
-    public static final String REFUSING_HOST = "jano1.sfbay.sun.com";
-    public static final String FAR_HOST = "irejano.ireland.sun.com";
+    public static final String HOST = "icedtea.classpath.org";
+    public static final String REFUSING_HOST = "ns1.gnu.org";
+    public static final String FAR_HOST = "developer.classpath.org";
     public static final String UNRESOLVABLE_HOST = "blah-blah.blah-blah.blah";
 
     private TestUtil() { }
diff -Nru openjdk.orig/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh openjdk/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh
--- openjdk.orig/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh	2008-11-06 08:45:08.000000000 +0000
+++ openjdk/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh	2008-11-17 14:48:52.000000000 +0000
@@ -26,14 +26,14 @@
 
 # @test
 # @bug 4763315
-# @build CanonicalName Lookup 
+# @build CanonicalName Lookup
 # @run shell/timeout=120 cname.sh
 # @summary Test DNS provider's handling of CNAME records
 
 
 # The host that we try to resolve
 
-HOST=webcache.sfbay.sun.com
+HOST=developer.classpath.org
 
 # fail gracefully if DNS is not configured or there 
 # isn't a CNAME record.

Reply via email to