--- old/test/hotspot/jtreg/TEST.ROOT 2019-01-25 22:33:37.596225435 -0800 +++ new/test/hotspot/jtreg/TEST.ROOT 2019-01-25 22:33:37.252225447 -0800 @@ -66,7 +66,8 @@ vm.graal.enabled \ vm.compiler1.enabled \ vm.compiler2.enabled \ - docker.support + docker.support \ + vm.nvdimm.test.enabled # Minimum jtreg version requiredVersion=4.2 b13 --- old/test/hotspot/jtreg/TEST.groups 2019-01-25 22:33:38.604225400 -0800 +++ new/test/hotspot/jtreg/TEST.groups 2019-01-25 22:33:38.276225411 -0800 @@ -59,7 +59,8 @@ -:hotspot_compiler \ -:hotspot_gc \ -:hotspot_runtime \ - -:hotspot_serviceability + -:hotspot_serviceability \ + -gc/nvdimm hotspot_native_sanity = \ native_sanity @@ -197,7 +198,7 @@ gc_epsilon = \ gc/epsilon/ \ gc/CriticalNativeArgs.java \ - gc/stress/CriticalNativeStress.java + gc/stress/CriticalNativeStress.java tier1_gc_gcold = \ gc/stress/gcold/TestGCOldWithG1.java \ @@ -210,7 +211,7 @@ gc/stress/gcbasher/TestGCBasherWithCMS.java \ gc/stress/gcbasher/TestGCBasherWithSerial.java \ gc/stress/gcbasher/TestGCBasherWithParallel.java - + tier1_gc_shenandoah = \ gc/shenandoah/options/ \ gc/shenandoah/compiler/ \ --- old/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAt.java 2019-01-25 22:33:39.592225365 -0800 +++ new/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAt.java 2019-01-25 22:33:39.260225377 -0800 @@ -25,6 +25,7 @@ * @key gc * @summary Test to check allocation of Java Heap with AllocateOldGenAt option * @requires vm.gc=="null" & os.family != "aix" + * @requires vm.nvdimm.test.enabled * @library /test/lib * @modules java.base/jdk.internal.misc */ --- old/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtError.java 2019-01-25 22:33:40.604225330 -0800 +++ new/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtError.java 2019-01-25 22:33:40.272225342 -0800 @@ -25,6 +25,7 @@ * @key gc * @summary Test to check correct handling of non-existent directory passed to AllocateOldGenAt option * @requires vm.gc=="null" & os.family != "aix" + * @requires vm.nvdimm.test.enabled * @library /test/lib * @modules java.base/jdk.internal.misc */ --- old/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtMultiple.java 2019-01-25 22:33:41.652225294 -0800 +++ new/test/hotspot/jtreg/gc/nvdimm/TestAllocateOldGenAtMultiple.java 2019-01-25 22:33:41.324225305 -0800 @@ -25,6 +25,7 @@ * @key gc * @summary Test to check allocation of Java Heap with AllocateOldGenAt option. Has multiple sub-tests to cover different code paths. * @requires vm.gc=="null" & os.family != "aix" + * @requires vm.nvdimm.test.enabled * @library /test/lib * @modules java.base/jdk.internal.misc * @requires vm.bits == "64" --- old/test/hotspot/jtreg/gc/nvdimm/TestHumongousObjectsOnNvdimm.java 2019-01-25 22:33:42.696225257 -0800 +++ new/test/hotspot/jtreg/gc/nvdimm/TestHumongousObjectsOnNvdimm.java 2019-01-25 22:33:42.364225269 -0800 @@ -26,6 +26,7 @@ * @summary Check that humongous objects reside in nv-dimm * @library /test/lib / * @requires vm.gc=="null" & os.family != "aix" + * @requires vm.nvdimm.test.enabled * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main TestHumongousObjectsOnNvdimm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions --- old/test/hotspot/jtreg/gc/nvdimm/TestOldObjectsOnNvdimm.java 2019-01-25 22:33:43.748225221 -0800 +++ new/test/hotspot/jtreg/gc/nvdimm/TestOldObjectsOnNvdimm.java 2019-01-25 22:33:43.420225232 -0800 @@ -25,6 +25,7 @@ * @test TestOldObjectsOnNvdimm * @summary Check that objects in old generation reside in dram. * @requires vm.gc=="null" & os.family != "aix" + * @requires vm.nvdimm.test.enabled * @library /test/lib * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox --- old/test/hotspot/jtreg/gc/nvdimm/TestYoungObjectsOnDram.java 2019-01-25 22:33:44.736225186 -0800 +++ new/test/hotspot/jtreg/gc/nvdimm/TestYoungObjectsOnDram.java 2019-01-25 22:33:44.440225197 -0800 @@ -25,6 +25,7 @@ * @test TestYoungObjectsOnDram * @summary Check that objects in young generation reside in dram. * @requires vm.gc=="null" & os.family != "aix" + * @requires vm.nvdimm.test.enabled * @library /test/lib * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox --- old/test/jtreg-ext/requires/VMProps.java 2019-01-25 22:33:45.640225155 -0800 +++ new/test/jtreg-ext/requires/VMProps.java 2019-01-25 22:33:45.308225166 -0800 @@ -97,6 +97,7 @@ map.put("vm.compiler2.enabled", isCompiler2Enabled()); map.put("docker.support", dockerSupport()); map.put("release.implementor", implementor()); + map.put("vm.nvdimm.test.enabled", isNvdimmTestEnabled()); vmGC(map); // vm.gc.X = true/false vmOptFinalFlags(map); @@ -469,6 +470,15 @@ return null; } + private String isNvdimmTestEnabled() { + String isEnbled = System.getenv("VM_NVDIMM_TEST"); + if (isEnbled != null && isEnbled.toLowerCase().equals("true")) { + return "true"; + } + return "false"; + } + + /** * Dumps the map to the file if the file name is given as the property.