Re: RFR: 8328619: sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java failed with BindException: Address already in use [v2]
On Mon, 25 Mar 2024 22:46:47 GMT, Kevin Walls wrote: >> Test uses jdk.test.lib.Utils.getFreePort() when launching a new Java >> command. >> Looks like it already recognises "java.rmi.server.ExportException: Port >> already in use: " and retries, but there is a long-standing typo in the >> check. >> >> e.g. >> >> test output: >> Error: Exception thrown by the agent: java.rmi.server.ExportException: Port >> already in use: 37049; nested exception is: >> java.net.BindException: Address already in use >> >> Test checks for: >> !output.getOutput().contains("Exception thrown by the agent : >> java.rmi.server.ExportException: Port already in use") >> >> Oops, we have an extra space in there. A day-one typo from JDK-7195249. >> >> While here, try to clarify the while loop which recognises this port >> failure. Also add something to clarify which test(s) failed, and correct a >> comment in test2 of AbstractFilePermissionTest.java > > Kevin Walls has updated the pull request incrementally with one additional > commit since the last revision: > > show exit code Thanks Daniel. Yes, the variations of the starting-with-a-free-port problem will be nice to standardize at some point... 8-) - PR Comment: https://git.openjdk.org/jdk/pull/18470#issuecomment-2024969513
Re: RFR: 8328619: sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java failed with BindException: Address already in use [v2]
On Mon, 25 Mar 2024 22:46:47 GMT, Kevin Walls wrote: >> Test uses jdk.test.lib.Utils.getFreePort() when launching a new Java >> command. >> Looks like it already recognises "java.rmi.server.ExportException: Port >> already in use: " and retries, but there is a long-standing typo in the >> check. >> >> e.g. >> >> test output: >> Error: Exception thrown by the agent: java.rmi.server.ExportException: Port >> already in use: 37049; nested exception is: >> java.net.BindException: Address already in use >> >> Test checks for: >> !output.getOutput().contains("Exception thrown by the agent : >> java.rmi.server.ExportException: Port already in use") >> >> Oops, we have an extra space in there. A day-one typo from JDK-7195249. >> >> While here, try to clarify the while loop which recognises this port >> failure. Also add something to clarify which test(s) failed, and correct a >> comment in test2 of AbstractFilePermissionTest.java > > Kevin Walls has updated the pull request incrementally with one additional > commit since the last revision: > > show exit code Looks reasonable. I wish we had a way to get rid of this getFreePort() logic. Marked as reviewed by dfuchs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/18470#pullrequestreview-1965847115 PR Review: https://git.openjdk.org/jdk/pull/18470#pullrequestreview-1965848443
Re: RFR: 8328619: sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java failed with BindException: Address already in use [v2]
On Mon, 25 Mar 2024 22:46:47 GMT, Kevin Walls wrote: >> Test uses jdk.test.lib.Utils.getFreePort() when launching a new Java >> command. >> Looks like it already recognises "java.rmi.server.ExportException: Port >> already in use: " and retries, but there is a long-standing typo in the >> check. >> >> e.g. >> >> test output: >> Error: Exception thrown by the agent: java.rmi.server.ExportException: Port >> already in use: 37049; nested exception is: >> java.net.BindException: Address already in use >> >> Test checks for: >> !output.getOutput().contains("Exception thrown by the agent : >> java.rmi.server.ExportException: Port already in use") >> >> Oops, we have an extra space in there. A day-one typo from JDK-7195249. >> >> While here, try to clarify the while loop which recognises this port >> failure. Also add something to clarify which test(s) failed, and correct a >> comment in test2 of AbstractFilePermissionTest.java > > Kevin Walls has updated the pull request incrementally with one additional > commit since the last revision: > > show exit code Marked as reviewed by lmesnik (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/18470#pullrequestreview-1958989271
Re: RFR: 8328619: sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java failed with BindException: Address already in use [v2]
> Test uses jdk.test.lib.Utils.getFreePort() when launching a new Java command. > Looks like it already recognises "java.rmi.server.ExportException: Port > already in use: " and retries, but there is a long-standing typo in the check. > > e.g. > > test output: > Error: Exception thrown by the agent: java.rmi.server.ExportException: Port > already in use: 37049; nested exception is: > java.net.BindException: Address already in use > > Test checks for: > !output.getOutput().contains("Exception thrown by the agent : > java.rmi.server.ExportException: Port already in use") > > Oops, we have an extra space in there. A day-one typo from JDK-7195249. > > While here, try to clarify the while loop which recognises this port failure. > Also add something to clarify which test(s) failed, and correct a comment in > test2 of AbstractFilePermissionTest.java Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: show exit code - Changes: - all: https://git.openjdk.org/jdk/pull/18470/files - new: https://git.openjdk.org/jdk/pull/18470/files/78456dac..5047f7d4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18470&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18470&range=00-01 Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/18470.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18470/head:pull/18470 PR: https://git.openjdk.org/jdk/pull/18470
Re: RFR: 8328619: sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java failed with BindException: Address already in use
On Mon, 25 Mar 2024 19:00:37 GMT, Chris Plummer wrote: >> Test uses jdk.test.lib.Utils.getFreePort() when launching a new Java >> command. >> Looks like it already recognises "java.rmi.server.ExportException: Port >> already in use: " and retries, but there is a long-standing typo in the >> check. >> >> e.g. >> >> test output: >> Error: Exception thrown by the agent: java.rmi.server.ExportException: Port >> already in use: 37049; nested exception is: >> java.net.BindException: Address already in use >> >> Test checks for: >> !output.getOutput().contains("Exception thrown by the agent : >> java.rmi.server.ExportException: Port already in use") >> >> Oops, we have an extra space in there. A day-one typo from JDK-7195249. >> >> While here, try to clarify the while loop which recognises this port >> failure. Also add something to clarify which test(s) failed, and correct a >> comment in test2 of AbstractFilePermissionTest.java > > test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java > line 144: > >> 142: >> 143: if (doTest() != 0) { >> 144: System.out.println("FAILURE"); > > Would be better to print out which test failed and include the error #. Maybe very marginally useful. I'll add it. 8-) It's the exit code of the JVM process, being zero or not zero, and the output already printed before the "FAILURE" note that will be the guide as to what went wrong. If it's the port failure, you'll see the retries then the eventual FAILURE, so that will be clear. If the JVM failed to startup, it's more the output than the exit code that we want. I really wanted the FAILURE printed because it tests two things, and when you see this test for the first time, it may not be obvious which of the tests is the actual failure - particularly as test2 is expected to cause an error and a non-zero exit code. So it says "1 failure", and you can stare at two things that look like failures. 8-) Maybe very marginally useful. I'll add it. 8-) It's the exit code of the JVM process, being zero or not zero, and the output already printed before the "FAILURE" note will be the guide as to what went wrong. (If it's the port failure, you'll see the retries then the eventual FAILURE, so that will be clear.) If the JVM failed to startup, it's more the text output than the exit code that we want. I really wanted the FAILURE printed because it tests two things, and when you see this test for the first time, it may not be obvious which of the tests is the actual failure - particularly as test2 is expected to cause an error and a non-zero exit code. So it says "1 failure", and you can stare at two things that look like failures. 8-) - PR Review Comment: https://git.openjdk.org/jdk/pull/18470#discussion_r1538323593
Re: RFR: 8328619: sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java failed with BindException: Address already in use
On Mon, 25 Mar 2024 13:15:48 GMT, Kevin Walls wrote: > Test uses jdk.test.lib.Utils.getFreePort() when launching a new Java command. > Looks like it already recognises "java.rmi.server.ExportException: Port > already in use: " and retries, but there is a long-standing typo in the check. > > e.g. > > test output: > Error: Exception thrown by the agent: java.rmi.server.ExportException: Port > already in use: 37049; nested exception is: > java.net.BindException: Address already in use > > Test checks for: > !output.getOutput().contains("Exception thrown by the agent : > java.rmi.server.ExportException: Port already in use") > > Oops, we have an extra space in there. A day-one typo from JDK-7195249. > > While here, try to clarify the while loop which recognises this port failure. > Also add something to clarify which test(s) failed, and correct a comment in > test2 of AbstractFilePermissionTest.java test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java line 144: > 142: > 143: if (doTest() != 0) { > 144: System.out.println("FAILURE"); Would be better to print out which test failed and include the error #. test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java line 159: > 157: > 158: if (doTest() == 0) { > 159: System.out.println("FAILURE"); Would be better to print out which test failed and include the error #. - PR Review Comment: https://git.openjdk.org/jdk/pull/18470#discussion_r1538097934 PR Review Comment: https://git.openjdk.org/jdk/pull/18470#discussion_r1538098137