< prev index next >

test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java

Print this page

@@ -26,37 +26,39 @@
  * @test
  * @summary Regression test for JDK-8098821
  * @bug 8098821
  * @requires vm.cds.archived.java.heap
  * @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules java.base/jdk.internal.misc
- * @modules java.management
  * @run driver SysDictCrash
- * @run main/othervm -XX:+UseStringDeduplication SysDictCrash
- * @run main/othervm -XX:-CompactStrings SysDictCrash
+ * @run driver SysDictCrash -XX:+UseStringDeduplication
+ * @run driver SysDictCrash -XX:-CompactStrings
  */
 
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
 
 public class SysDictCrash {
     public static void main(String[] args) throws Exception {
+        String vmOptionsPrefix[] = args;
+
         // SharedBaseAddress=0 puts the archive at a very high address on solaris,
         // which provokes the crash.
         ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.concat(vmOptionsPrefix,
             "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
             "-cp", ".",
             "-XX:SharedBaseAddress=0", "-XX:SharedArchiveFile=./SysDictCrash.jsa",
             "-Xshare:dump",
-            "-showversion", "-Xlog:cds,cds+hashtables");
+            "-showversion", "-Xlog:cds,cds+hashtables"));
 
         TestCommon.checkDump(TestCommon.executeAndLog(dumpPb, "dump"));
 
         ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
+          TestCommon.concat(vmOptionsPrefix,
             "-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
             "-XX:SharedArchiveFile=./SysDictCrash.jsa",
             "-Xshare:on",
-            "-version");
+            "-version"));
 
         TestCommon.checkExec(TestCommon.executeAndLog(runPb, "exec"));
     }
 }
< prev index next >