RFR(M): 8178054: [TESTBUG] Need test for JVM TI IsModifiableModule
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Fri Jun 9 18:32:41 UTC 2017
On 6/9/17 02:38, Alan Bateman wrote:
>
>
> On 09/06/2017 10:07, serguei.spitsyn at oracle.com wrote:
>> Hi Alan,
>>
>> Thank you for the comments!
>>
>> I've made a stand-alone IsModifiableModule test and also added
>> "@modules jdk.jdi" to the GetNamedModuleTest.
>>
>> New webrev:
>> http://cr.openjdk.java.net/~sspitsyn/webrevs/2017/hotspot/8178054-jvmti-ismodif.3/
>>
> This mostly looks good.
>
> One suggestion is to drop the "not_a_module" parameter from
> test_is_modifable_module as it is not needed. Instead the test just
> needs to provide any non-Module object to check_is_modifable (it
> doesn't have to a class loader).
Ok, I removed the get_class_loader function, replaced the loader with a
class and left alone the "not_a_module" parameter.
This is the simplest way to provide a non-module jobject.
Otherwise, the JNIEnv parameter has to be passed to the
check_is_modifiable_error_codes .
Also, I've done a small refactoring by inlining the
test_is_modifiable_module body into the *_check function.
New webrev:
http://cr.openjdk.java.net/~sspitsyn/webrevs/2017/hotspot/8178054-jvmti-ismodif.4/
Thanks,
Serguei
>
> -Alan.
More information about the serviceability-dev
mailing list