Index: tests/vts/vm/src/test/vm/jvmti/funcs/RunAgentThread/RunAgentThread0101/RunAgentThread0101.cpp =================================================================== --- tests/vts/vm/src/test/vm/jvmti/funcs/RunAgentThread/RunAgentThread0101/RunAgentThread0101.cpp (revision 629081) +++ tests/vts/vm/src/test/vm/jvmti/funcs/RunAgentThread/RunAgentThread0101/RunAgentThread0101.cpp (working copy) @@ -33,7 +33,6 @@ static bool test_0 = false; static bool test_1 = false; -static bool util = false; static bool flag = false; /* *********************************************************************** */ @@ -130,6 +129,9 @@ result = jvmti_env->RunAgentThread(thread_1, proc, NULL, JVMTI_THREAD_NORM_PRIORITY); + jint state = 0; + while((result = jvmti_env->GetThreadState(thread_1, &state)) == JVMTI_ERROR_NONE && state != JVMTI_THREAD_STATE_TERMINATED); + fprintf(stderr, "\tnative: RunAgentThread result = %d (must be zero) \n", result); if (result != JVMTI_ERROR_NONE) return; @@ -143,7 +145,7 @@ fprintf(stderr, "\n\tTest of function RunAgentThread0101 : "); - if (test_0 && test_1 && util) + if (test_0 && test_1) fprintf(stderr, " passed \n"); else fprintf(stderr, " failed \n"); @@ -165,8 +167,6 @@ if (arg == NULL) fprintf(stderr, "\tnative: func was called with arg = NULL\n"); - util = true; - test_1 = true; #ifndef LINUX