8210624: Clean up better loading tests
authorcoleenp
Wed, 12 Sep 2018 08:26:31 -0400
changeset 53323 bc9faf59936d
parent 53322 8ba5b3c76857
child 53324 cbb8341a127a
8210624: Clean up better loading tests Reviewed-by: hseigel, jwilhelm
test/hotspot/jtreg/runtime/ClassUnload/ConstantPoolDependsTest.java
test/hotspot/jtreg/runtime/ClassUnload/DictionaryDependsTest.java
test/hotspot/jtreg/runtime/ClassUnload/SuperDependsTest.java
--- a/test/hotspot/jtreg/runtime/ClassUnload/ConstantPoolDependsTest.java	Mon Sep 10 16:49:01 2018 -0400
+++ b/test/hotspot/jtreg/runtime/ClassUnload/ConstantPoolDependsTest.java	Wed Sep 12 08:26:31 2018 -0400
@@ -25,6 +25,7 @@
  * @test ConstantPoolDependsTest
  * @bug 8210094
  * @summary Create ClassLoader dependency from initiating loader to class loader through constant pool reference
+ * @requires vm.opt.final.ClassUnloading
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  * @library /runtime/testlibrary /test/lib
@@ -32,7 +33,7 @@
  * @compile p2/c2.java MyDiffClassLoader.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+PrintSystemDictionaryAtExit -Xlog:class+unload=trace -XX:+WhiteBoxAPI ConstantPoolDependsTest
+ * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -Xlog:class+unload -XX:+WhiteBoxAPI ConstantPoolDependsTest
  */
 
 import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/runtime/ClassUnload/DictionaryDependsTest.java	Mon Sep 10 16:49:01 2018 -0400
+++ b/test/hotspot/jtreg/runtime/ClassUnload/DictionaryDependsTest.java	Wed Sep 12 08:26:31 2018 -0400
@@ -25,6 +25,7 @@
  * @test DictionaryDependsTest
  * @bug 8210094
  * @summary Create ClassLoader dependency from initiating loader to class loader through reflection
+ * @requires vm.opt.final.ClassUnloading
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  * @library /runtime/testlibrary /test/lib
@@ -32,7 +33,7 @@
  * @compile p2/c2.java MyDiffClassLoader.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -Xlog:class+unload=trace -XX:+WhiteBoxAPI DictionaryDependsTest
+ * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -Xlog:class+unload -XX:+WhiteBoxAPI DictionaryDependsTest
  */
 import sun.hotspot.WhiteBox;
 import java.lang.reflect.Method;
--- a/test/hotspot/jtreg/runtime/ClassUnload/SuperDependsTest.java	Mon Sep 10 16:49:01 2018 -0400
+++ b/test/hotspot/jtreg/runtime/ClassUnload/SuperDependsTest.java	Wed Sep 12 08:26:31 2018 -0400
@@ -25,7 +25,7 @@
  * @test SuperDependsTest
  * @bug 8210094
  * @summary Create ClassLoader dependency from initiating loader to class loader through subclassing
- * @library /test/lib
+ * @requires vm.opt.final.ClassUnloading
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  * @library /runtime/testlibrary /test/lib
@@ -33,7 +33,7 @@
  * @compile p2/c2.java MyDiffClassLoader.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+PrintSystemDictionaryAtExit -Xlog:class+unload=trace -XX:+WhiteBoxAPI SuperDependsTest
+ * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -Xlog:class+unload -XX:+WhiteBoxAPI SuperDependsTest
  */
 import sun.hotspot.WhiteBox;
 import p2.*;