changeset 51529:087d15f4934e

8034084: nsk.nsk/jvmti/ThreadStart/threadstart003 Wrong number of thread end events Reviewed-by: amenkov, dholmes, sspitsyn
author gadams
date Thu, 23 Aug 2018 07:54:19 -0400
parents eb8d5aeabab3
children fcf2fdd96a33
files test/hotspot/jtreg/ProblemList.txt test/hotspot/jtreg/vmTestbase/nsk/jvmti/ThreadStart/threadstart003/threadstart003.c
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/ProblemList.txt	Thu Aug 23 18:14:53 2018 -0400
+++ b/test/hotspot/jtreg/ProblemList.txt	Thu Aug 23 07:54:19 2018 -0400
@@ -180,7 +180,6 @@
 vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003/TestDescription.java 6606767 generic-all
 vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004/TestDescription.java 7013634,6606767 generic-all
 vmTestbase/nsk/jvmti/ThreadStart/threadstart001/TestDescription.java 8016181 generic-all
-vmTestbase/nsk/jvmti/ThreadStart/threadstart003/TestDescription.java 8034084 generic-all
 vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/TestDescription.java 8173658 generic-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java 8204506,8203350 generic-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java 6813266 generic-all
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ThreadStart/threadstart003/threadstart003.c	Thu Aug 23 18:14:53 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ThreadStart/threadstart003/threadstart003.c	Thu Aug 23 07:54:19 2018 -0400
@@ -216,7 +216,7 @@
                TranslateError(err), err);
         result = STATUS_FAILED;
     }
-    err = (*jvmti)->RawMonitorWait(jvmti, wait_lock, (jlong)WAIT_TIME);
+    err = (*jvmti)->RawMonitorWait(jvmti, wait_lock, 0);
     if (err != JVMTI_ERROR_NONE) {
         printf("(RawMonitorWait) unexpected error: %s (%d)\n",
                TranslateError(err), err);
@@ -235,7 +235,16 @@
                TranslateError(err), err);
         result = STATUS_FAILED;
     }
-    err = (*jvmti)->RawMonitorWait(jvmti, wait_lock, (jlong)WAIT_TIME);
+    // Wait for up to 3 seconds for the thread end event
+    {
+        int i;
+        for (i = 0; i < 3 ; i++) {
+            err = (*jvmti)->RawMonitorWait(jvmti, wait_lock, (jlong)WAIT_TIME);
+            if (endsCount == endsExpected || err != JVMTI_ERROR_NONE) {
+                break;
+            }
+        }
+    }
     if (err != JVMTI_ERROR_NONE) {
         printf("(RawMonitorWait) unexpected error: %s (%d)\n",
                TranslateError(err), err);