changeset 11026:a28a680b1288

8133647: (ch) Test java/nio/channels/AsynchronousSocketChannel/StressLoopback.java fails for Windows XP Summary: Ignore WSAEINVAL returned by NET_EnableFastTcpLoopback(). Reviewed-by: coffeys, alanb
author bpb
date Thu, 03 Sep 2015 11:57:27 -0700
parents 3a9cc17978a8
children 97b3a4fc3290
files src/windows/native/sun/nio/ch/Net.c test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/nio/ch/Net.c	Tue Sep 01 21:44:07 2015 +0200
+++ b/src/windows/native/sun/nio/ch/Net.c	Thu Sep 03 11:57:27 2015 -0700
@@ -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");
--- a/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java	Tue Sep 01 21:44:07 2015 +0200
+++ b/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java	Thu Sep 03 11:57:27 2015 -0700
@@ -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