The test counts all "system" threads before the execution and expects that this number remains the same during test execution. This makes the test fragile - JVM may start internal threads, some threads may end.
The fix updates the test: - the test checks only test threads, and verify that the live threads are reported by GetAllThreads and terminated threads are not reported; - dropped "system" thread counting stuff; - added proper deallocation of GetThreadInfo results. ------------- Commit messages: - Fixed allthr001 test Changes: https://git.openjdk.java.net/jdk/pull/8512/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8512&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284027 Stats: 109 lines in 3 files changed: 46 ins; 41 del; 22 mod Patch: https://git.openjdk.java.net/jdk/pull/8512.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8512/head:pull/8512 PR: https://git.openjdk.java.net/jdk/pull/8512