8185531: [TESTBUG] Improve test configuration for shared strings
authormseledtsov
Wed, 01 Aug 2018 19:07:27 -0700
changeset 51279 5cc6acb1d6b6
parent 51278 d56dd9798d54
child 51280 a306c84e40fa
8185531: [TESTBUG] Improve test configuration for shared strings Summary: Added extra test configurations to the tests Reviewed-by: iklam, gziemski
test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java	Wed Aug 01 19:07:27 2018 -0700
@@ -33,6 +33,8 @@
  * @build HelloStringGC sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  * @run main ExerciseGC
+ * @run main/othervm -XX:+UseStringDeduplication ExerciseGC
+ * @run main/othervm -XX:-CompactStrings ExerciseGC
  */
 public class ExerciseGC {
     public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java	Wed Aug 01 19:07:27 2018 -0700
@@ -36,6 +36,8 @@
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @build HelloString
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions
+ * @run main/othervm -XX:+UseStringDeduplication -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions
+ * @run main/othervm -XX:-CompactStrings -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions
  */
 
 import jdk.test.lib.Asserts;
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java	Wed Aug 01 19:07:27 2018 -0700
@@ -34,6 +34,8 @@
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  * @run main InternSharedString
+ * @run main/othervm -XX:+UseStringDeduplication InternSharedString
+ * @run main/othervm -XX:-CompactStrings InternSharedString
  */
 
 public class InternSharedString {
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java	Wed Aug 01 19:07:27 2018 -0700
@@ -32,6 +32,8 @@
  *          jdk.jartool/sun.tools.jar
  * @build HelloString
  * @run main InvalidFileFormat
+ * @run main/othervm -XX:+UseStringDeduplication InvalidFileFormat
+ * @run main/othervm -XX:-CompactStrings InvalidFileFormat
  */
 
 import jdk.test.lib.process.OutputAnalyzer;
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java	Wed Aug 01 19:07:27 2018 -0700
@@ -32,6 +32,8 @@
  *          jdk.jartool/sun.tools.jar
  * @build HelloString
  * @run main LargePages
+ * @run main/othervm -XX:+UseStringDeduplication LargePages
+ * @run main/othervm -XX:-CompactStrings LargePages
  */
 public class LargePages {
     public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java	Wed Aug 01 19:07:27 2018 -0700
@@ -34,6 +34,8 @@
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  * @run main LockSharedStrings
+ * @run main/othervm -XX:+UseStringDeduplication LockSharedStrings
+ * @run main/othervm -XX:-CompactStrings LockSharedStrings
  */
 
 public class LockSharedStrings {
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java	Wed Aug 01 19:07:27 2018 -0700
@@ -32,6 +32,8 @@
  *          jdk.jartool/sun.tools.jar
  * @build HelloString
  * @run main SharedStringsBasic
+ * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasic
+ * @run main/othervm -XX:-CompactStrings SharedStringsBasic
  */
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java	Wed Aug 01 19:07:27 2018 -0700
@@ -33,6 +33,8 @@
  * @build HelloStringPlus sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  * @run main SharedStringsBasicPlus
+ * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasicPlus
+ * @run main/othervm -XX:-CompactStrings SharedStringsBasicPlus
  */
 
 public class SharedStringsBasicPlus {
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java	Wed Aug 01 19:07:27 2018 -0700
@@ -30,6 +30,8 @@
  * @modules jdk.jartool/sun.tools.jar
  * @build HelloString
  * @run main SharedStringsStress
+ * @run main/othervm -XX:+UseStringDeduplication SharedStringsStress
+ * @run main/othervm -XX:-CompactStrings SharedStringsStress
  */
 import java.io.File;
 import java.io.FileOutputStream;
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java	Wed Aug 01 19:07:27 2018 -0700
@@ -33,6 +33,8 @@
  * @build sun.hotspot.WhiteBox SharedStringsWb
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  * @run main SharedStringsWbTest
+ * @run main/othervm -XX:+UseStringDeduplication SharedStringsWbTest
+ * @run main/othervm -XX:-CompactStrings SharedStringsWbTest
  */
 
 import java.io.*;
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java	Wed Aug 01 19:14:04 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java	Wed Aug 01 19:07:27 2018 -0700
@@ -32,6 +32,8 @@
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @run main SysDictCrash
+ * @run main/othervm -XX:+UseStringDeduplication SysDictCrash
+ * @run main/othervm -XX:-CompactStrings SysDictCrash
  */
 
 import jdk.test.lib.process.OutputAnalyzer;