--- old/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java 2018-10-29 14:02:58.433739517 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java 2018-10-29 14:02:58.073725271 -0700 @@ -30,8 +30,8 @@ * @modules jdk.jartool/sun.tools.jar * @build HelloString * @run driver SharedStringsStress - * @run main/othervm -XX:+UseStringDeduplication SharedStringsStress - * @run main/othervm -XX:-CompactStrings SharedStringsStress + * @run driver SharedStringsStress -XX:+UseStringDeduplication + * @run driver SharedStringsStress -XX:-CompactStrings */ import java.io.File; import java.io.FileOutputStream; @@ -42,6 +42,7 @@ public class SharedStringsStress { public static void main(String[] args) throws Exception { + String vmOptionsPrefix[] = args; String appJar = JarBuilder.build("SharedStringsStress", "HelloString"); String sharedArchiveConfigFile = System.getProperty("user.dir") + File.separator + "SharedStringsStress_gen.txt"; @@ -58,9 +59,11 @@ } OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"), - "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile); + TestCommon.concat(vmOptionsPrefix, + "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile)); TestCommon.checkDump(dumpOutput); - OutputAnalyzer execOutput = TestCommon.exec(appJar, "HelloString"); + OutputAnalyzer execOutput = TestCommon.exec(appJar, + TestCommon.concat(vmOptionsPrefix, "HelloString")); TestCommon.checkExec(execOutput); } }