< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp

Print this page
rev 52028 : 8211801: Remove the NSK_CPP_STUB macros from vmTestbase for jvmti/scenarios/[A-E]
Summary:
Reviewed-by:

*** 74,85 **** int i; NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) return NSK_FALSE; --- 74,84 ---- int i; NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ ! if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) return NSK_FALSE;
*** 87,98 **** for (i = 0; i < threads_count; i++) { if (!NSK_VERIFY(threads[i] != NULL)) return NSK_FALSE; /* get thread information */ ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); /* find by name */ --- 86,96 ---- for (i = 0; i < threads_count; i++) { if (!NSK_VERIFY(threads[i] != NULL)) return NSK_FALSE; /* get thread information */ ! if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); /* find by name */
*** 100,127 **** thread = threads[i]; } } /* deallocate threads list */ ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) return NSK_FALSE; /* get tested thread class */ ! if (!NSK_JNI_VERIFY(jni, (klass = ! NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL)) return NSK_FALSE; /* get tested thread method 'run' */ ! if (!NSK_JNI_VERIFY(jni, (method = ! NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL)) return NSK_FALSE; /* get tested thread field 'waitingMonitor' */ if (!NSK_JNI_VERIFY(jni, (field = ! NSK_CPP_STUB4(GetFieldID, jni, klass, ! "waitingMonitor", "Ljava/lang/Object;")) != NULL)) return NSK_FALSE; return NSK_TRUE; } --- 98,121 ---- thread = threads[i]; } } /* deallocate threads list */ ! if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; /* get tested thread class */ ! if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL)) return NSK_FALSE; /* get tested thread method 'run' */ ! if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL)) return NSK_FALSE; /* get tested thread field 'waitingMonitor' */ if (!NSK_JNI_VERIFY(jni, (field = ! jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL)) return NSK_FALSE; return NSK_TRUE; }
*** 130,140 **** /* Check GetPotentialCapabilities function */ static int checkGetPotentialCapabilities() { jvmtiCapabilities caps; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps))) return NSK_FALSE; if (!caps.CAPABILITY) { NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n", CAPABILITY_STR); return NSK_FALSE; --- 124,134 ---- /* Check GetPotentialCapabilities function */ static int checkGetPotentialCapabilities() { jvmtiCapabilities caps; ! if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps))) return NSK_FALSE; if (!caps.CAPABILITY) { NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n", CAPABILITY_STR); return NSK_FALSE;
*** 148,158 **** static int checkAddCapabilities() { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.CAPABILITY = 1; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) return NSK_FALSE; return NSK_TRUE; } --- 142,152 ---- static int checkAddCapabilities() { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.CAPABILITY = 1; ! if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return NSK_FALSE; return NSK_TRUE; }
*** 160,170 **** */ static int checkGetCapabilities(int owe) { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) return NSK_FALSE; if (owe && !caps.CAPABILITY) { NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n", CAPABILITY_STR); return NSK_FALSE; --- 154,164 ---- */ static int checkGetCapabilities(int owe) { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); ! if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return NSK_FALSE; if (owe && !caps.CAPABILITY) { NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n", CAPABILITY_STR); return NSK_FALSE;
*** 182,192 **** static int checkRelinquishCapabilities() { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.CAPABILITY = 1; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps))) return NSK_FALSE; return NSK_TRUE; } --- 176,186 ---- static int checkRelinquishCapabilities() { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.CAPABILITY = 1; ! if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps))) return NSK_FALSE; return NSK_TRUE; }
*** 196,222 **** */ static int checkSuspend() { jvmtiError err; NSK_DISPLAY0("Checking negative: SuspendThread\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB2(SuspendThread, jvmti, thread))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: ResumeThread\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB2(ResumeThread, jvmti, thread))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SuspendThreadList\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: ResumeThreadList\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err))) return NSK_FALSE; return NSK_TRUE; } --- 190,214 ---- */ static int checkSuspend() { jvmtiError err; NSK_DISPLAY0("Checking negative: SuspendThread\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,jvmti->SuspendThread(thread))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: ResumeThread\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,jvmti->ResumeThread(thread))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SuspendThreadList\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->SuspendThreadList(1, &thread, &err))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: ResumeThreadList\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->ResumeThreadList(1, &thread, &err))) return NSK_FALSE; return NSK_TRUE; }
*** 228,258 **** const char* THREAD_DEATH_CTOR_SIGNATURE = "()V"; jclass cls = NULL; jmethodID ctor = NULL; jobject exception = NULL; ! if (!NSK_JNI_VERIFY(jni, (cls = ! NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (ctor = ! NSK_CPP_STUB4(GetMethodID, jni, cls, ! THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL)) return NSK_FALSE; ! if (!NSK_JNI_VERIFY(jni, (exception = ! NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL)) return NSK_FALSE; NSK_DISPLAY0("Checking negative: StopThread\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(StopThread, jvmti, thread, exception))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: InterruptThread\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB2(InterruptThread, jvmti, thread))) return NSK_FALSE; return NSK_TRUE; } --- 220,246 ---- const char* THREAD_DEATH_CTOR_SIGNATURE = "()V"; jclass cls = NULL; jmethodID ctor = NULL; jobject exception = NULL; ! if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (ctor = ! jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL)) return NSK_FALSE; ! if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL)) return NSK_FALSE; NSK_DISPLAY0("Checking negative: StopThread\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->StopThread(thread, exception))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: InterruptThread\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,jvmti->InterruptThread(thread))) return NSK_FALSE; return NSK_TRUE; }
*** 262,272 **** jint count; jobject *monitors = NULL; NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors))) return NSK_FALSE; return NSK_TRUE; } --- 250,260 ---- jint count; jobject *monitors = NULL; NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetOwnedMonitorInfo(thread, &count, &monitors))) return NSK_FALSE; return NSK_TRUE; }
*** 275,296 **** static int checkGetCurrentContendedMonitor() { jobject monitor = NULL; NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor))) return NSK_FALSE; return NSK_TRUE; } /* Check "can_pop_frame" function */ static int checkPopFrame() { NSK_DISPLAY0("Checking negative: PopFrame\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB2(PopFrame, jvmti, thread))) return NSK_FALSE; return NSK_TRUE; } --- 263,283 ---- static int checkGetCurrentContendedMonitor() { jobject monitor = NULL; NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetCurrentContendedMonitor(thread, &monitor))) return NSK_FALSE; return NSK_TRUE; } /* Check "can_pop_frame" function */ static int checkPopFrame() { NSK_DISPLAY0("Checking negative: PopFrame\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,jvmti->PopFrame(thread))) return NSK_FALSE; return NSK_TRUE; }
*** 330,376 **** jlong *res_tags = NULL; jint dummy_user_data = 0; NSK_DISPLAY0("Checking negative: SetTag\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetTag\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(GetTag, jvmti, thread, &tag))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n"); tag = TAG_VALUE; if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag, ! &count, &res_objects, &res_tags))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverHeap\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED, ! HeapObject, &dummy_user_data))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass, ! JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread, ! ObjectReference, &dummy_user_data))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, ! HeapRoot, StackReference, ObjectReference, &dummy_user_data))) return NSK_FALSE; return NSK_TRUE; } --- 317,365 ---- jlong *res_tags = NULL; jint dummy_user_data = 0; NSK_DISPLAY0("Checking negative: SetTag\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->SetTag(thread, TAG_VALUE))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetTag\n"); ! if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,jvmti->GetTag(thread, &tag))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n"); tag = TAG_VALUE; if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverHeap\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->IterateOverInstancesOfClass(klass, ! JVMTI_HEAP_OBJECT_UNTAGGED, ! HeapObject, ! &dummy_user_data))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->IterateOverObjectsReachableFromObject(thread, ! ObjectReference, ! &dummy_user_data))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->IterateOverReachableObjects(HeapRoot, ! StackReference, ! ObjectReference, ! &dummy_user_data))) return NSK_FALSE; return NSK_TRUE; }
*** 385,446 **** jfloat float_value; jdouble double_value; NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count, ! &local_variable_table))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalObject\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalInt\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalLong\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalFloat\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalDouble\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalObject\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalInt\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalLong\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalFloat\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalDouble\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0))) return NSK_FALSE; return NSK_TRUE; } --- 374,434 ---- jfloat float_value; jdouble double_value; NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetLocalVariableTable(method, &count, &local_variable_table))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalObject\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetLocalObject(thread, 0, 0, &object_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalInt\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetLocalInt(thread, 0, 0, &int_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalLong\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetLocalLong(thread, 0, 0, &long_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalFloat\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetLocalFloat(thread, 0, 0, &float_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLocalDouble\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetLocalDouble(thread, 0, 0, &double_value))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalObject\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->SetLocalObject(thread, 0, 0, thread))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalInt\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->SetLocalInt(thread, 0, 0, (jint)0))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalLong\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->SetLocalLong(thread, 0, 0, (jlong)0))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalFloat\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: SetLocalDouble\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0))) return NSK_FALSE; return NSK_TRUE; }
*** 451,472 **** jint count; jvmtiLineNumberEntry *line_number_table = NULL; NSK_DISPLAY0("Checking negative: GetSourceFileName\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLineNumberTable\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count, ! &line_number_table))) return NSK_FALSE; return NSK_TRUE; } --- 439,459 ---- jint count; jvmtiLineNumberEntry *line_number_table = NULL; NSK_DISPLAY0("Checking negative: GetSourceFileName\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetSourceFileName(klass, &name))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetSourceDebugExtension(klass, &name))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetLineNumberTable\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetLineNumberTable(method, &count, &line_number_table))) return NSK_FALSE; return NSK_TRUE; }
*** 478,488 **** NSK_DISPLAY0("Checking negative: RedefineClasses\n"); class_def.klass = klass; class_def.class_byte_count = 0; class_def.class_bytes = NULL; if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def))) return NSK_FALSE; return NSK_TRUE; } --- 465,475 ---- NSK_DISPLAY0("Checking negative: RedefineClasses\n"); class_def.klass = klass; class_def.class_byte_count = 0; class_def.class_bytes = NULL; if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->RedefineClasses(1, &class_def))) return NSK_FALSE; return NSK_TRUE; }
*** 491,501 **** static int checkGetObjectMonitorUsage() { jvmtiMonitorUsage monitor_info; NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info))) return NSK_FALSE; return NSK_TRUE; } --- 478,488 ---- static int checkGetObjectMonitorUsage() { jvmtiMonitorUsage monitor_info; NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetObjectMonitorUsage(thread, &monitor_info))) return NSK_FALSE; return NSK_TRUE; }
*** 504,530 **** static int checkIsSyntheticFunctions(int positive) { jboolean is_synthetic; if (positive) { NSK_DISPLAY0("Checking positive: IsFieldSynthetic\n"); ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic))) return NSK_FALSE; NSK_DISPLAY0("Checking positive: IsMethodSynthetic\n"); ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic))) return NSK_FALSE; } else { NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic))) return NSK_FALSE; } return NSK_TRUE; } --- 491,515 ---- static int checkIsSyntheticFunctions(int positive) { jboolean is_synthetic; if (positive) { NSK_DISPLAY0("Checking positive: IsFieldSynthetic\n"); ! if (!NSK_JVMTI_VERIFY(jvmti->IsFieldSynthetic(klass, field, &is_synthetic))) return NSK_FALSE; NSK_DISPLAY0("Checking positive: IsMethodSynthetic\n"); ! if (!NSK_JVMTI_VERIFY(jvmti->IsMethodSynthetic(method, &is_synthetic))) return NSK_FALSE; } else { NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->IsFieldSynthetic(klass, field, &is_synthetic))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->IsMethodSynthetic(method, &is_synthetic))) return NSK_FALSE; } return NSK_TRUE; }
*** 535,545 **** jint count; unsigned char *bytecodes; NSK_DISPLAY0("Checking negative: GetBytecodes\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes))) return NSK_FALSE; return NSK_TRUE; } --- 520,530 ---- jint count; unsigned char *bytecodes; NSK_DISPLAY0("Checking negative: GetBytecodes\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetBytecodes(method, &count, &bytecodes))) return NSK_FALSE; return NSK_TRUE; }
*** 549,564 **** jvmtiTimerInfo info; jlong nanos; NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos))) return NSK_FALSE; return NSK_TRUE; } --- 534,549 ---- jvmtiTimerInfo info; jlong nanos; NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetCurrentThreadCpuTimerInfo(&info))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetCurrentThreadCpuTime(&nanos))) return NSK_FALSE; return NSK_TRUE; }
*** 568,583 **** jvmtiTimerInfo info; jlong nanos; NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos))) return NSK_FALSE; return NSK_TRUE; } --- 553,568 ---- jvmtiTimerInfo info; jlong nanos; NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetThreadCpuTimerInfo(&info))) return NSK_FALSE; NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, ! jvmti->GetThreadCpuTime(thread, &nanos))) return NSK_FALSE; return NSK_TRUE; }
< prev index next >