adoptium / aqa-tests

Home of test infrastructure for Adoptium builds
https://adoptium.net/aqavit
Apache License 2.0
125 stars 304 forks source link

Add support for running custom serviceability jvmti test #5357

Closed fengxue-IS closed 1 week ago

fengxue-IS commented 1 month ago

I'd like to request ability to run custom serviceability jvmti test. Ideally with new test target: serviceability_jvmti_custom where a custom test path can be provided.

default test to run: serviceability/jvmti/GetSystemProperty/JvmtiGetSystemPropertyTest.java

fengxue-IS commented 1 month ago

FYI @llxia

llxia commented 1 month ago

On second thought, instead of creating a separate test target for serviceability, maybe we can leverage the existing hotspot_custom https://github.com/adoptium/aqa-tests/blob/feb08cae5a6334532d44446d54c43696d2673112/openjdk/playlist.xml#L98

Remove https://github.com/adoptium/aqa-tests/blob/feb08cae5a6334532d44446d54c43696d2673112/openjdk/playlist.xml#L118-L120 and disable <impl>openj9</impl> via <disables>.

In this way, openj9 dev users can run any hotspot folder target via TARGET=disabled.hotspot_custom.

@LongyuZhang could you take care of this one? Thanks

LongyuZhang commented 1 month ago

Tested running with TARGET: disabled.hotspot_custom, and CUSTOM_TARGET: serviceability/jvmti/GetSystemProperty/JvmtiGetSystemPropertyTest.java. The test runs but the CUSTOM_TARGET was not taken as hotspot_custom runs HOTSPOT_CUSTOM_TARGET (link) instead. Found a related open issue https://github.com/adoptium/aqa-tests/issues/4408, which needs to be resolved first.

llxia commented 1 month ago

just for the record, usage for openj9

TARGET=disabled.hotspot_custom
CUSTOM_TARGET=serviceability/jvmti/GetSystemProperty/JvmtiGetSystemPropertyTest.java
LongyuZhang commented 1 week ago

Close this issue as fixed by https://github.com/adoptium/aqa-tests/pull/5370.

sophia-guo commented 1 week ago

Note per #5370, for openj9, hotspot_custom can only be used for serviceability jvmti test jdk19+ with the -nativepath set as hotspot native path -nativepath:"$(TESTIMAGE_PATH)/hotspot/jtreg/native, which meets currently requirements. It won't work if tests require openj9 nativepath. Better to add some comments or update some documents.

sophia-guo commented 1 week ago

I would prefer to add a custom serviceability jvmti test target instead of using hotspot_custom as a hack, which is confusing.