8185436: jtreg: introduce @requires property to disable cds tests
authorgoetz
Thu, 03 Aug 2017 10:24:34 +0200
changeset 46779 d80ca591ae48
parent 46777 02604fd56ae4
child 46780 50dca6b8294e
8185436: jtreg: introduce @requires property to disable cds tests Summary: Fix CompressedClassPointers test to succeed also if cds is not available. Reviewed-by: jiangli, mseledtsov, iklam
hotspot/src/share/vm/prims/whitebox.cpp
hotspot/test/TEST.ROOT
hotspot/test/gc/g1/TestSharedArchiveWithPreTouch.java
hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java
hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java
hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java
hotspot/test/runtime/CompressedOops/CompressedClassPointers.java
hotspot/test/runtime/NMT/NMTWithCDS.java
hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java
hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java
hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java
hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java
hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java
hotspot/test/runtime/SharedArchiveFile/DumpSharedDictionary.java
hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java
hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java
hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java
hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java
hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java
hotspot/test/runtime/SharedArchiveFile/SharedStrings.java
hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java
hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java
hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java
hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java
hotspot/test/runtime/SharedArchiveFile/TestInterpreterMethodEntries.java
hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java
hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java
hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java
hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java
hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Thu Aug 03 10:24:34 2017 +0200
@@ -1700,6 +1700,14 @@
   return StringTable::shared_string_ignored();
 WB_END
 
+WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env))
+#if INCLUDE_CDS
+  return true;
+#else
+  return false;
+#endif
+WB_END
+
 //Some convenience methods to deal with objects from java
 int WhiteBox::offset_for_field(const char* field_name, oop object,
     Symbol* signature_symbol) {
@@ -1993,6 +2001,7 @@
   {CC"isShared",           CC"(Ljava/lang/Object;)Z", (void*)&WB_IsShared },
   {CC"isSharedClass",      CC"(Ljava/lang/Class;)Z",  (void*)&WB_IsSharedClass },
   {CC"areSharedStringsIgnored",           CC"()Z",    (void*)&WB_AreSharedStringsIgnored },
+  {CC"isCDSIncludedInVmBuild",            CC"()Z",    (void*)&WB_IsCDSIncludedInVmBuild },
   {CC"clearInlineCaches0",  CC"(Z)V",                 (void*)&WB_ClearInlineCaches },
   {CC"addCompilerDirective",    CC"(Ljava/lang/String;)I",
                                                       (void*)&WB_AddCompilerDirective },
--- a/hotspot/test/TEST.ROOT	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/TEST.ROOT	Thu Aug 03 10:24:34 2017 +0200
@@ -51,7 +51,8 @@
     vm.debug \
     vm.rtm.cpu \
     vm.rtm.os \
-    vm.aot
+    vm.aot \
+    vm.cds
 
 # Tests using jtreg 4.2 b07 features
 requiredVersion=4.2 b07
--- a/hotspot/test/gc/g1/TestSharedArchiveWithPreTouch.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/gc/g1/TestSharedArchiveWithPreTouch.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,13 +21,13 @@
  * questions.
  */
 
-/*
+/**
  * @test
  * @bug 8169703
  * @summary Verifies that dumping and loading a CDS archive succeeds with AlwaysPreTouch
  * @requires vm.gc.G1
- * @key gc
- * @key regression
+ * @key gc regression
+ * @requires vm.cds
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
--- a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8003424
  * @summary Testing UseCompressedClassPointers with CDS
  * @library /test/lib
--- a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8003424
  * @summary Test that cannot use CDS if UseCompressedClassPointers is turned off.
  * @library /test/lib
--- a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8005933
  * @summary Test that -Xshare:auto uses CDS when explicitly specified with -server.
  * @library /test/lib
--- a/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -106,6 +106,9 @@
             "-XX:+VerifyBeforeGC",
             "-Xshare:dump");
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        if (output.firstMatch("Shared spaces are not supported in this VM") != null) {
+            return;
+        }
         try {
           output.shouldContain("Loading classes to share");
           output.shouldHaveExitValue(0);
--- a/hotspot/test/runtime/NMT/NMTWithCDS.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/NMT/NMTWithCDS.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,15 +21,17 @@
  * questions.
  */
 
-/*
+/**
  * @test
  * @bug 8055061
  * @key nmt
+ * @requires vm.cds
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main NMTWithCDS
  */
+
 import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.process.OutputAnalyzer;
 
--- a/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test ArchiveDoesNotExist
+ * @requires vm.cds
  * @summary Test how VM handles "file does not exist" situation while
  *          attempting to use CDS archive. JVM should exit gracefully
  *          when sharing mode is ON, and continue w/o sharing if sharing
--- a/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java	Thu Aug 03 10:24:34 2017 +0200
@@ -23,6 +23,7 @@
 
 /**
  * @test
+ * @requires vm.cds
  * @summary Testing -Xbootclasspath/a support for CDS
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test CdsDifferentCompactStrings
+ * @requires vm.cds
  * @summary CDS (class data sharing) requires the same -XX:[+-]CompactStrings
  *          setting between archive creation time and load time.
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test CdsDifferentObjectAlignment
+ * @requires vm.cds
  * @summary Testing CDS (class data sharing) using varying object alignment.
  *          Using different object alignment for each dump/load pair.
  *          This is a negative test; using  object alignment for loading that
--- a/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test CdsSameObjectAlignment
+ * @requires vm.cds
  * @summary Testing CDS (class data sharing) using varying object alignment.
  *          Using same object alignment for each dump/load pair
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/DumpSharedDictionary.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/DumpSharedDictionary.java	Thu Aug 03 10:24:34 2017 +0200
@@ -26,6 +26,7 @@
  * @bug 8130072
  * @summary Check that Shared Dictionary is printed out with jcmd
  * Feature support: compressed oops/kptrs, 64-bit os, not on windows
+ * @requires vm.cds
  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8067187
  * @summary Testing CDS dumping with the -XX:MaxMetaspaceSize=<size> option
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8066670
  * @summary Testing -XX:+PrintSharedArchiveAndExit option
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test SASymbolTableTest
+ * @requires vm.cds
  * @summary Walk symbol table using SA, with and without CDS.
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8014138
  * @summary Testing new -XX:SharedArchiveFile=<file-name> option
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test SharedBaseAddress
+ * @requires vm.cds
  * @summary Test variety of values for SharedBaseAddress, making sure
  *          VM handles normal values as well as edge values w/o a crash.
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary Check to make sure that shared strings in the bootstrap CDS archive
  *          are actually shared
  * Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test SharedStringsDedup
+ * @requires vm.cds
  * @summary Test -Xshare:auto with shared strings and -XX:+UseStringDeduplication
  * Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test SharedStringsAuto
+ * @requires vm.cds
  * @summary Test -Xshare:auto with shared strings.
  * Feature support: G1GC only, compressed oops/kptrs, 64-bit os, not on windows
  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
--- a/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @bug 8059510
  * @summary Test SharedSymbolTableBucketSize option
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
--- a/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test SpaceUtilizationCheck
+ * @requires vm.cds
  * @summary Check if the space utilization for shared spaces is adequate
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @library /test/lib
--- a/hotspot/test/runtime/SharedArchiveFile/TestInterpreterMethodEntries.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/TestInterpreterMethodEntries.java	Thu Aug 03 10:24:34 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test InterpreterMethodEntries
+ * @requires vm.cds
  * @bug 8169711
  * @summary Test interpreter method entries for intrinsics with CDS (class data sharing)
  *          and different settings of the intrinsic flag during dump/use of the archive.
--- a/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary Exercise initial transformation (ClassFileLoadHook)
  *  with CDS with Interface/Implementor pair
  * @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
--- a/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperAndSubClasses.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,8 +22,9 @@
  */
 
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary Exercise initial transformation (ClassFileLoadHook)
  *  with CDS with SubClass and SuperClass
  * @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
--- a/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/SharedArchiveFile/serviceability/transformRelatedClasses/TransformSuperSubTwoPckgs.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,8 +22,9 @@
  */
 
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary Exercise initial transformation (ClassFileLoadHook)
  *  with CDS with SubClass and SuperClass, each lives in own separate package
  * @library /test/lib /runtime/SharedArchiveFile /testlibrary/jvmti
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary test that --patch-module works with CDS
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java	Tue Aug 08 22:58:44 2017 +0200
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleClassList.java	Thu Aug 03 10:24:34 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @requires vm.cds
  * @summary classes which are not useable during run time should not be included in the classlist
  * @library /test/lib
  * @modules java.base/jdk.internal.misc