harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4330) [buildtest][vts] Test vm/jvmti/funcs/ClearFieldModif/ClearFieldModif0103/ClearFieldModif0103.xml is incorrect
Date Wed, 04 Jul 2007 06:09:04 GMT
[buildtest][vts] Test vm/jvmti/funcs/ClearFieldModif/ClearFieldModif0103/ClearFieldModif0103.xml
is incorrect

                 Key: HARMONY-4330
                 URL: https://issues.apache.org/jira/browse/HARMONY-4330
             Project: Harmony
          Issue Type: Bug
          Components: build - test - ci
            Reporter: Vera Petrashkova
         Attachments: ClearFieldModif0103.patch

According to J2SE JVMTI specification 
of ClearFieldModificationWatch method:
    Cancel a field modification watch previously set by SetFieldModificationWatch, 
    on the field specified by klass and field.
    It returns JVMTI_ERROR_NOT_FOUND when the designated field is not being watched for modifications.

VTS test 
is incorrect because it invokes SetFieldModificationWatch  and then ClearFieldModificationWatch
using the same filed. 

See source code:
---------- ClearFieldModif0103.cpp--------------
void JNICALL callbackException(prms_EXCPT)
    if (!is_needed_field_found(jvmti_env, "ClearFieldModif0103.java", "third_field", &myclass,
&myfield, DEBUG_OUT))

    result = jvmti_env->SetFieldModificationWatch(myclass, myfield);   <<<<<<<<<<
    fprintf(stderr, "\tnative: SetFieldModificationWatch result = %d (must be zero) \n", result);
    fprintf(stderr, "\tnative: class is %p \n", myclass);
    fprintf(stderr, "\tnative: field is %p \n", myfield);
    if (result != JVMTI_ERROR_NONE) return;

    result = jvmti_env->ClearFieldModificationWatch(myclass, myfield); <<<<<<<<<<<
    fprintf(stderr, "\tnative: ClearFieldModificationWatch result = %d (must be JVMTI_ERROR_NOT_FOUND
(41)) \n", result);
    fprintf(stderr, "\tnative: class is %p \n", myclass);
    fprintf(stderr, "\tnative: field is %p \n", myfield);
    if (result == JVMTI_ERROR_NOT_FOUND) test = true;

As the result the test  fails on Harmony and RI.

This test should be fixed to call ClearFieldModificationWatch with other than "third_field".

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message