# HG changeset patch # User goetz # Date 1501596186 -7200 # Node ID 9465c23e4e0dbed4751d9b64f3813cab7036de96 # Parent 3a86e1e929c7a35584d90ca0ed71ed4dfbda3ae0 8185436: jtreg: introduce @requires property to disable cds tests Reviewed-by: jiangli, mseledtsov, iklam diff -r 3a86e1e929c7 -r 9465c23e4e0d test/jtreg-ext/requires/VMProps.java --- a/test/jtreg-ext/requires/VMProps.java Tue Aug 08 21:15:58 2017 +0200 +++ b/test/jtreg-ext/requires/VMProps.java Tue Aug 01 16:03:06 2017 +0200 @@ -71,6 +71,8 @@ map.put("vm.rtm.cpu", vmRTMCPU()); map.put("vm.rtm.os", vmRTMOS()); map.put("vm.aot", vmAOT()); + // vm.cds is true if the VM is compiled with cds support. + map.put("vm.cds", vmCDS()); vmGC(map); // vm.gc.X = true/false VMProps.dump(map); @@ -278,6 +280,19 @@ } /** + * Check for CDS support. + * + * @return true if CDS is supported by the VM to be tested. + */ + protected String vmCDS() { + if (WB.isCDSIncludedInVmBuild()) { + return "true"; + } else { + return "false"; + } + } + + /** * Dumps the map to the file if the file name is given as the property. * This functionality could be helpful to know context in the real * execution. diff -r 3a86e1e929c7 -r 9465c23e4e0d test/lib/sun/hotspot/WhiteBox.java --- a/test/lib/sun/hotspot/WhiteBox.java Tue Aug 08 21:15:58 2017 +0200 +++ b/test/lib/sun/hotspot/WhiteBox.java Tue Aug 01 16:03:06 2017 +0200 @@ -523,6 +523,7 @@ public native boolean isShared(Object o); public native boolean isSharedClass(Class c); public native boolean areSharedStringsIgnored(); + public native boolean isCDSIncludedInVmBuild(); // Compiler Directive public native int addCompilerDirective(String compDirect);