RFR (xs) 8251209 [TESTBUG] CDS jvmti tests should use "@modules java.instrument"
Alan Bateman
Alan.Bateman at oracle.com
Fri Aug 7 05:49:40 UTC 2020
On 07/08/2020 01:58, David Holmes wrote:
>
> It does in fact ensure that:
>
> "Otherwise, a test will not be run if the system being tested does not
> contain all of the specified modules."
>
> http://openjdk.java.net/jtreg/tag-spec.html
>
> But as I said the module could be present in a JRE but you are still
> using the MinimalVM.
Right, tests with `@modules java.instrument` will not be selected if the
run-time under test doesn't contain this module.
It would be a bit strange to create a run-time image with a minimal VM
build that doesn't have JVM TI but include java.instrument. All usages
of -javaagent would be fatal because the JPLIS agent uses JVM TI. A long
time ago there were calls for a way java.management and java.instrument
to express that they required specific VM features but I don't think it
came to anything. So nothing in jlink to catch this at link-time, at
least for the case that there is only one libjvm in the generated
run-time image. So technically I think the tests would need both
@requires and @modules if someone really wanted to be able to run all
tests with the minimal VM and expect jtreg to not select these tests.
-Alan.
More information about the serviceability-dev
mailing list