You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vera Petrashkova (JIRA)" <ji...@apache.org> on 2007/07/04 14:52:04 UTC
[jira] Created: (HARMONY-4339) [buildtest][vts] Test
vm/jvmti/funcs/AddToBootCLSearch/AddToBootCLSearch0102/AddToBootCLSearch0102.xml
is incorrect
[buildtest][vts] Test vm/jvmti/funcs/AddToBootCLSearch/AddToBootCLSearch0102/AddToBootCLSearch0102.xml is incorrect
-------------------------------------------------------------------------------------------------------------------
Key: HARMONY-4339
URL: https://issues.apache.org/jira/browse/HARMONY-4339
Project: Harmony
Issue Type: Bug
Components: build - test - ci
Reporter: Vera Petrashkova
Priority: Minor
According to J2SE JVMTI specification:
Method
AddToBootstrapClassLoaderSearch(jvmtiEnv* env, const char* segment)
After the bootstrap class loader unsuccessfully searches for a class,
the specified platform-dependent search path segment will be searched as well.
This method returns JVMTI_ERROR_ILLEGAL_ARGUMENT if segment is an invalid path.
VTS test
vm/jvmti/funcs/AddToBootCLSearch/AddToBootCLSearch0102/AddToBootCLSearch0102.xml
is incorrect It bases on the wrong assumption that VM returns JVMTI_ERROR_ILLEGAL_ARGUMENT
when used path is absent.
See source code:
--------AddToBootCLSearch0102.cpp--------------
JNIEXPORT jint JNICALL Agent_OnLoad(prms_AGENT_ONLOAD)
{
Callbacks CB;
check_AGENT_ONLOAD;
jvmtiEvent events[] = {JVMTI_EVENT_VM_DEATH };
cb_death;
jvmtiEnv *jvmti;
jvmtiError result;
#ifdef LINUX
const char* path = "/there/is/not/such/path/."; <<<<<<<<<<<<< correct path which does not exist
#else
const char* path = "c:\\there\\is\\not\\such\\path\\."; <<<<<<<<<<<<< correct path which does not exist
#endif
jint res = func_for_Agent_OnLoad_JVMTI(vm, options, reserved, &CB,
events, sizeof(events)/4, test_case_name, DEBUG_OUT, &jvmti);
util = true;
result = jvmti->AddToBootstrapClassLoaderSearch(path);
fprintf(stderr, "\tnative: AddToBootstrapClassLoaderSearch result = %d (must be JVMTI_ERROR_ILLEGAL_ARGUMENT (103)) \n", result);
if (result == JVMTI_ERROR_ILLEGAL_ARGUMENT) test = true;
return res;
}
void JNICALL callbackVMDeath(prms_VMDEATH)
{
check_VMDEATH;
func_for_callback_VMDeath(jni_env, jvmti_env, test_case_name, test, util);
}
-----------------
This test fails on RI.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.