On Wed, 1 Nov 2023 17:54:00 GMT, Mandy Chung <mch...@openjdk.org> wrote:
> `TestLoadLibraryDeadlock.java` test runs `LoadLibraryDeadlock` and wait for 5 > seconds and then grab the output. Then run `jcmd` to dump the thread stacks > in case there is a deadlock. The test ignores and swallows any exception > which makes it hard to diagnose test issues. > > This PR simplifies the test to use `jdk.test.lib.process.ProcessTools` to > launch `LoadLibraryDeadlock` test so that the output and error will be > captured in the same way as other tools are run by this test. Also update > the test to propagate exceptions where appropriate. This hopes to collect > more information to diagnose the issue if this test fails next time. test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/TestLoadLibraryDeadlock.java line 115: > 113: Collections.addAll(commands, java); > 114: Collections.addAll(commands, Utils.getTestJavaOpts()); > 115: Collections.addAll(commands, command); The prose description talks about using ProcessTools, but the runCommand code doesn't use ProcessTools.createTestJavaProcessBuilder. It could save a few steps. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16459#discussion_r1379167496