--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe003/popframe003.cpp Wed Dec 19 20:53:30 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe003/popframe003.cpp Wed Dec 19 14:08:08 2018 -0800
@@ -77,53 +77,42 @@
}
JNIEXPORT jint JNICALL
-Java_nsk_jvmti_PopFrame_popframe003_suspThread(JNIEnv *env,
- jclass cls, jint vrb, jobject susThr) {
- jvmtiError err;
-
+Java_nsk_jvmti_PopFrame_popframe003_suspThread(JNIEnv *env, jclass cls, jobject susThr) {
if (!caps.can_pop_frame || !caps.can_suspend) {
return PASSED;
}
- if (vrb == 1)
- printf(">>>>>>>> Invoke SuspendThread()\n");
- err = jvmti->SuspendThread(susThr);
+ printf(">>>>>>>> Invoke SuspendThread()\n");
+ jvmtiError err = jvmti->SuspendThread(susThr);
if (err != JVMTI_ERROR_NONE) {
printf("%s: Failed to call SuspendThread(): error=%d: %s\n",
__FILE__, err, TranslateError(err));
return JNI_ERR;
}
- if (vrb == 1)
- printf("<<<<<<<< SuspendThread() is successfully done\n");
+ printf("<<<<<<<< SuspendThread() is successfully done\n");
return PASSED;
}
JNIEXPORT jint JNICALL
-Java_nsk_jvmti_PopFrame_popframe003_resThread(JNIEnv *env, jclass cls, jint vrb,
- jobject susThr) {
- jvmtiError err;
-
+Java_nsk_jvmti_PopFrame_popframe003_resThread(JNIEnv *env, jclass cls, jobject susThr) {
if (!caps.can_pop_frame || !caps.can_suspend) {
return PASSED;
}
- if (vrb == 1)
- printf(">>>>>>>> Invoke ResumeThread()\n");
- err = jvmti->ResumeThread(susThr);
+ printf(">>>>>>>> Invoke ResumeThread()\n");
+ jvmtiError err = jvmti->ResumeThread(susThr);
if (err != JVMTI_ERROR_NONE) {
printf("%s: Failed to call ResumeThread(): error=%d: %s\n",
__FILE__, err, TranslateError(err));
return JNI_ERR;
}
- if (vrb == 1)
- printf("<<<<<<<< ResumeThread() is successfully done\n");
+ printf("<<<<<<<< ResumeThread() is successfully done\n");
return PASSED;
}
JNIEXPORT jint JNICALL
-Java_nsk_jvmti_PopFrame_popframe003_doPopFrame(JNIEnv *env, jclass cls, jint vrb,
- jobject frameThr) {
+Java_nsk_jvmti_PopFrame_popframe003_doPopFrame(JNIEnv *env, jclass cls, jobject frameThr) {
jvmtiError err;
if (!caps.can_pop_frame || !caps.can_suspend) {
@@ -146,8 +135,7 @@
tot_result = STATUS_FAILED;
}
- if (vrb == 1)
- printf(">>>>>>>> Invoke PopFrame()\n");
+ printf(">>>>>>>> Invoke PopFrame()\n");
set_watch_ev(1); /* watch JVMTI events */
err = jvmti->PopFrame(frameThr);
@@ -157,16 +145,18 @@
printf("\tFor more info about this error see the JVMTI spec.\n");
tot_result = STATUS_FAILED;
}
- else if (vrb == 1)
+ else {
printf("Check #1 PASSED: PopFrame() is successfully done\n");
+ }
set_watch_ev(0); /* ignore again JVMTI events */
if (gen_ev) {
printf("TEST FAILED: %d JVMTI events were generated by the function PopFrame()\n",
gen_ev);
tot_result = STATUS_FAILED;
- } else if (vrb == 1)
+ } else {
printf("Check #2 PASSED: No JVMTI events were generated by the function PopFrame()\n");
+ }
return(tot_result);
}