-
Bug
-
Resolution: Fixed
-
P4
-
11, 12, 13
-
b17
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8228928 | 12u-cpu | Aleksey Shipilev | P4 | Resolved | Fixed | master |
JDK-8222996 | 12.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b03 |
JDK-8222872 | 11.0.4 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
Happened with me on older Debian. There:
$ nc -lU
nc: invalid option -- 'U'
nc -h for help
Which leads to:
$ make run-test TEST=java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java
...
TEST RESULT: Error. Agent error: java.lang.Exception: Agent 1 timed out with a timeout of 480 seconds; check console log for any additional details
This fixes the test:
diff -r 8de62c4af8c7 test/jdk/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java
--- a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java Fri Apr 12 13:35:23 2019 +0800
+++ b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java Fri Apr 12 15:17:01 2019 +0200
@@ -61,6 +61,14 @@
return;
}
+ // Verify that 'nc' accepts '-U' for Unix domain sockets.
+ // Skip the test if it is not.
+ Process procHelp = Runtime.getRuntime().exec(CMD_BASE + " -h");
+ if (procHelp.waitFor() != 0) {
+ System.err.println("Netcat does not accept required options; skipping test.");
+ return;
+ }
+
// Create a new sub-directory of the nominal test directory in which
// 'nc' will create the socket file.
String testSubDir = System.getProperty("test.dir", ".")
$ nc -lU
nc: invalid option -- 'U'
nc -h for help
Which leads to:
$ make run-test TEST=java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java
...
TEST RESULT: Error. Agent error: java.lang.Exception: Agent 1 timed out with a timeout of 480 seconds; check console log for any additional details
This fixes the test:
diff -r 8de62c4af8c7 test/jdk/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java
--- a/test/jdk/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java Fri Apr 12 13:35:23 2019 +0800
+++ b/test/jdk/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java Fri Apr 12 15:17:01 2019 +0200
@@ -61,6 +61,14 @@
return;
}
+ // Verify that 'nc' accepts '-U' for Unix domain sockets.
+ // Skip the test if it is not.
+ Process procHelp = Runtime.getRuntime().exec(CMD_BASE + " -h");
+ if (procHelp.waitFor() != 0) {
+ System.err.println("Netcat does not accept required options; skipping test.");
+ return;
+ }
+
// Create a new sub-directory of the nominal test directory in which
// 'nc' will create the socket file.
String testSubDir = System.getProperty("test.dir", ".")
- backported by
-
JDK-8222872 java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile hangs when "nc" does not accept "-U"
-
- Resolved
-
-
JDK-8222996 java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile hangs when "nc" does not accept "-U"
-
- Resolved
-
-
JDK-8228928 java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile hangs when "nc" does not accept "-U"
-
- Resolved
-
- relates to
-
JDK-8146359 test/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java fails when nc is not available
-
- Closed
-