[PATCH] 8133647: (ch) Test java/nio/channels/AsynchronousSocketChannel/StressLoopback.java fails for Windows XP
Seán Coffey
sean.coffey at oracle.com
Thu Sep 3 17:57:07 UTC 2015
Looks fine Brian. I made a similar change when porting this fix to jdk7.
Since WinXP was not supported on JDK 8, I didn't see it as important.
Probably still a good move to fix in jdk8u to keep windows XP breathing
where possible I guess. Thanks for handling.
Regards,
Sean.
On 03/09/2015 18:39, Brian Burkhalter wrote:
> 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/c871791d/attachment.html>
More information about the nio-dev
mailing list