[PATCH] 8133647: (ch) Test java/nio/channels/AsynchronousSocketChannel/StressLoopback.java fails for Windows XP

Brian Burkhalter brian.burkhalter at oracle.com
Thu Sep 3 17:39:14 UTC 2015


Please review at your convenience this patch for jdk8u-dev.

Issue:	https://bugs.openjdk.java.net/browse/JDK-8133647
Patch:	included below

Summary:

Ignore WSAEINVAL returned from NET_EnableFastTcpLoopback(). With this patch the test now succeeds on Windows XP and the usual regression test target platforms.

The change to StressLoopback.java is not very interesting: perhaps a “noreg-trivial” label on the issue would be better?

Subsequent to approval a separate request will be sent to jdk8u-dev.

Thanks,

Brian

--- a/src/windows/native/sun/nio/ch/Net.c
+++ b/src/windows/native/sun/nio/ch/Net.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -157,7 +157,7 @@
         if (loopback_available) {
             int rv = NET_EnableFastTcpLoopback((jint)s);
             if (rv) {
-                if (rv == WSAEOPNOTSUPP) {
+                if (rv == WSAEOPNOTSUPP || rv == WSAEINVAL) {
                     loopback_available = 0;
                 } else {
                     NET_ThrowNew(env, rv, "fastLoopback");
diff --git a/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java b/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java
--- a/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java
+++ b/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 6834246 6842687
+ * @bug 6834246 6842687 8133647
  * @summary Stress test connections through the loopback interface
  * @run main StressLoopback
  * @run main/othervm -Djdk.net.useFastTcpLoopback StressLoopback
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20150903/de3b8872/attachment-0001.html>


More information about the nio-dev mailing list