Skip to content

Commit

Permalink
8034084: nsk.nsk/jvmti/ThreadStart/threadstart003 Wrong number of thr…
Browse files Browse the repository at this point in the history
…ead end events

Backport-of: 14bb474
  • Loading branch information
GoeLin committed Nov 16, 2021
1 parent 9f7729a commit 3593e1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion test/hotspot/jtreg/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted001/TestDescription.java 7013
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/hotswap/HS102/hs102t002/TestDescription.java 8204506,8203350 generic-all
vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java 6813266 generic-all
vmTestbase/nsk/jvmti/AttachOnDemand/attach034/TestDescription.java 8042145 generic-all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Java_nsk_jvmti_ThreadStart_threadstart003_check(JNIEnv *env,
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);
Expand All @@ -235,7 +235,16 @@ Java_nsk_jvmti_ThreadStart_threadstart003_check(JNIEnv *env,
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);
Expand Down

1 comment on commit 3593e1e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.