On Mon, 2 May 2022 23:20:52 GMT, Alex Menkov <amen...@openjdk.org> wrote:
> 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. test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAllThreads/allthr001/allthr001.cpp line 170: > 168: } > 169: > 170: void release(JNIEnv *env, jvmtiThreadInfo *info) { How about "releaseThreadInfo"? test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAllThreads/allthr001/allthr001.cpp line 238: > 236: } > 237: if (printdump == JNI_TRUE) { > 238: printf(" >>> %s", inf.name); Don't you want a newline here? test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAllThreads/allthr001/allthr001.cpp line 240: > 238: printf(" >>> %s", inf.name); > 239: } > 240: for (j = 0, found = 0; j < thrInfo[ind].unexpected.cnt && > !found; j++) { found = JNI_FALSE ------------- PR: https://git.openjdk.java.net/jdk/pull/8512