requires filtering for jvm features?

Igor Ignatev igor.ignatyev at oracle.com
Wed May 12 16:59:22 UTC 2021


Hi Thomas,

that's b/c https://openjdk.java.net/jtreg/tag-spec.html#requires_names lists only "standard supported names". for JVM features, like CDS and NMT, we use test-suite specific properties, which are registered in `requires.properties` property in the corresponding TEST.ROOT, the value of these "@requires properties" are to be defined by the classes listed in `requires.extraPropDefns` (in the same TEST.ROOT).

for all jdk/jdk test suites, we use the same "extraPropDefns" class -- test/jtreg-ext/requires/VMProps.java, but we tend to register only the properties we use in a test suite. VMProps defines the following properties for CDS-supported "vm.cds", "vm.cds.custom.loaders", "vm.cds.archived.java.heap" and I don't think we have anything for NMT, but it should be quite easy to add.

HTH,
-- Igor

On May 12, 2021, at 12:23 AM, Thomas Stüfe <thomas.stuefe at gmail.com<mailto:thomas.stuefe at gmail.com>> wrote:

Hi,

I looked at https://openjdk.java.net/jtreg/tag-spec.html#requires_names but
could not find an answer to this:

Is there a way to use @requires to filter tests for JVM features? E.g. if I
build without NMT or CDS, a way to skip tests testing these specific
components?

Thanks!

Thomas



More information about the jtreg-dev mailing list