< prev index next >
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java
Print this page
@@ -28,22 +28,23 @@
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
* @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;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
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";
try (FileOutputStream fos = new FileOutputStream(sharedArchiveConfigFile)) {
PrintWriter out = new PrintWriter(new OutputStreamWriter(fos));
@@ -56,11 +57,13 @@
}
out.close();
}
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);
}
}
< prev index next >