8218464: vmTestbase/nsk/jdi/VirtualMachine/allThreads/allthreads001/TestDescription.java failed
Reviewed-by: sspitsyn, gadams
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allThreads/allthreads001.java Thu Feb 28 14:22:03 2019 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/VirtualMachine/allThreads/allthreads001.java Wed Mar 06 09:30:05 2019 -0800
@@ -42,7 +42,7 @@
* <code>com.sun.jdi.VirtualMachine.allThreads()</code> <BR>
* complies with the its spec. <BR>
* <BR>
- * The test checks up the reasults of the method when <BR>
+ * The test checks up the results of the method when <BR>
* it is invoked two times in raw immediately after <BR>
* new thread has been started in the debuggee VM. <BR>
* <BR>
@@ -192,11 +192,15 @@
String threadName = "testedThread";
+ // Suspend VM to ensure no new background thread (e.g. JVMCI
+ // compiler thread) is started between two allThreads() calls.
+ vm.suspend();
List allThreads1 = vm.allThreads();
log2("allThreads1.size() = " + allThreads1.size());
List allThreads2 = vm.allThreads();
log2("allThreads2.size() = " + allThreads2.size());
+ vm.resume();
if ( allThreads1.size() != allThreads2.size() ) {
log3("ERROR: allThreads1.size() != allThreads2.size()");