In JDK-8185531, [TESTBUG] Improve test configuration for shared strings, the @run lines with -XX:+UseStringDeduplication and -XX:-CompactStrings are added:
* @run main LockSharedStrings
+ * @run main/othervm -XX:+UseStringDeduplication LockSharedStrings
+ * @run main/othervm -XX:-CompactStrings LockSharedStrings
However, this affects only the "main" program, LockSharedStrings, but has no effect on the child JVM processes launched by the main program. As the real test for cds shared strings happen inside the child processes, these extra options should be passed to the child processes instead.
The following tests are affected
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/SharedStringsUtils.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java
* @run main LockSharedStrings
+ * @run main/othervm -XX:+UseStringDeduplication LockSharedStrings
+ * @run main/othervm -XX:-CompactStrings LockSharedStrings
However, this affects only the "main" program, LockSharedStrings, but has no effect on the child JVM processes launched by the main program. As the real test for cds shared strings happen inside the child processes, these extra options should be passed to the child processes instead.
The following tests are affected
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/SharedStringsUtils.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java