RFR: 8203923: Add @requires feature to check flag values for the running JVM
Stefan Karlsson
stefan.karlsson at oracle.com
Tue May 29 14:21:09 UTC 2018
Hi all,
Please review this patch to add @requires vm.opt.final.<vm flag name>,
as a way to filter jtreg tests on the final value of flags in the test VM.
http://cr.openjdk.java.net/~stefank/8203923/webrev.01/
https://bugs.openjdk.java.net/browse/JDK-8203923
This patch is needed to allow tests to be filtered out when ZGC is run.
ZGC doesn't support UseCompressedOops (and currently doesn't support
ClassUnloading). Instead of adding @requires vm.gc != "Z" for tests that
rely on ClassUnloading, I think it's nicer to write @requires
vm.opt.final.ClassUnloading.
This will filter out the test if any of the following conditions are met:
1) The currently executing VM doesn't support ClassUnloading
2) -XX:-ClassUnloading is passed to the test
The second case can today be handled by @requires vm.opt.ClassUnloading
== NULL | vm.opt.ClassUnloading == true, or maybe simpler @requires
vm.opt.ClassUnloading != false, but if you need both @requires
vm.opt.final.ClassUnloading should be used.
The current solution requires the queried flags to be listed in
vmOptFinalFlags. Maybe there's a way to get this to cover all flags
automatically?
Thanks,
StefanK
More information about the hotspot-dev
mailing list