< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/AddToSystemClassLoaderSearch/systemclssearch_agent.cpp

Print this page
rev 52185 : 8212148: Remove remaining NSK_CPP_STUBs
Summary: Remove remaining macros
Reviewed-by: amenkov, phh

*** 49,60 **** * Add segment to bootstrap classloader path. * @returns NSK_FALSE if any error occured. */ static int addSegment(jvmtiEnv* jvmti, const char segment[], const char where[]) { NSK_DISPLAY1("Add segment: \"%s\"\n", segment); ! if (!NSK_JVMTI_VERIFY( ! NSK_CPP_STUB2(AddToSystemClassLoaderSearch, jvmti, segment))) { NSK_COMPLAIN1("TEST FAILURE: failed to add segment %s\n", segment); return NSK_FALSE; } NSK_DISPLAY0(" ... added\n"); --- 49,59 ---- * Add segment to bootstrap classloader path. * @returns NSK_FALSE if any error occured. */ static int addSegment(jvmtiEnv* jvmti, const char segment[], const char where[]) { NSK_DISPLAY1("Add segment: \"%s\"\n", segment); ! if (!NSK_JVMTI_VERIFY(jvmti->AddToSystemClassLoaderSearch(segment))) { NSK_COMPLAIN1("TEST FAILURE: failed to add segment %s\n", segment); return NSK_FALSE; } NSK_DISPLAY0(" ... added\n");
*** 66,77 **** * (expectedError) is returned. * @returns NSK_FALSE if no error or wronf error is occured. */ static int addIllegalSegment(jvmtiEnv* jvmti, const char segment[], const char where[], jvmtiError expectedError) { NSK_DISPLAY1("Add illegal segment: \"%s\"\n", segment); ! if (!NSK_JVMTI_VERIFY_CODE(expectedError, ! NSK_CPP_STUB2(AddToSystemClassLoaderSearch, jvmti, segment))) { NSK_COMPLAIN2("TEST FAILURE: got wrong error when tried to add segment %s (expected error=%s)\n", segment, TranslateError(expectedError)); return NSK_FALSE; } --- 65,75 ---- * (expectedError) is returned. * @returns NSK_FALSE if no error or wronf error is occured. */ static int addIllegalSegment(jvmtiEnv* jvmti, const char segment[], const char where[], jvmtiError expectedError) { NSK_DISPLAY1("Add illegal segment: \"%s\"\n", segment); ! if (!NSK_JVMTI_VERIFY_CODE(expectedError, jvmti->AddToSystemClassLoaderSearch(segment))) { NSK_COMPLAIN2("TEST FAILURE: got wrong error when tried to add segment %s (expected error=%s)\n", segment, TranslateError(expectedError)); return NSK_FALSE; }
*** 121,131 **** */ void JNICALL callbackVMDeath(jvmtiEnv *jvmti, JNIEnv* jni) { jvmtiPhase phase; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) { NSK_COMPLAIN0("TEST FAILURE: unable to get phase\n"); nsk_jvmti_setFailStatus(); NSK_BEFORE_TRACE(exit(nsk_jvmti_getStatus())); } --- 119,129 ---- */ void JNICALL callbackVMDeath(jvmtiEnv *jvmti, JNIEnv* jni) { jvmtiPhase phase; ! if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) { NSK_COMPLAIN0("TEST FAILURE: unable to get phase\n"); nsk_jvmti_setFailStatus(); NSK_BEFORE_TRACE(exit(nsk_jvmti_getStatus())); }
*** 216,227 **** memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; ! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, ! &eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } } NSK_DISPLAY0(" ... set\n"); --- 214,224 ---- memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; ! if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } } NSK_DISPLAY0(" ... set\n");
< prev index next >