< prev index next >

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

Print this page

*** 57,70 **** "The shared archive file's ObjectAlignmentInBytes of .* does not equal the current ObjectAlignmentInBytes of"; static final String COMPACT_STRING_MISMATCH = "The shared archive file's CompactStrings setting .* does not equal the current CompactStrings setting"; static String appJar; ! static String[] globalVmOptions; public static void main(String[] args) throws Exception { ! globalVmOptions = args; // specified by "@run main" in IncompatibleOptions_*.java appJar = JarBuilder.build("IncompatibleOptions", "HelloString"); // Uncompressed OOPs testDump(1, "-XX:+UseG1GC", "-XX:-UseCompressedOops", COOPS_DUMP_WARNING, true); if (GC.Z.isSupported()) { // ZGC is included in build. --- 57,70 ---- "The shared archive file's ObjectAlignmentInBytes of .* does not equal the current ObjectAlignmentInBytes of"; static final String COMPACT_STRING_MISMATCH = "The shared archive file's CompactStrings setting .* does not equal the current CompactStrings setting"; static String appJar; ! static String[] vmOptionsPrefix = {}; public static void main(String[] args) throws Exception { ! vmOptionsPrefix = args; // specified by "@run main" in IncompatibleOptions_*.java appJar = JarBuilder.build("IncompatibleOptions", "HelloString"); // Uncompressed OOPs testDump(1, "-XX:+UseG1GC", "-XX:-UseCompressedOops", COOPS_DUMP_WARNING, true); if (GC.Z.isSupported()) { // ZGC is included in build.
*** 116,126 **** static void testDump(int testCaseNr, String collectorOption, String extraOption, String expectedWarning, boolean expectedToFail) throws Exception { System.out.println("Testcase: " + testCaseNr); OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello"), ! TestCommon.concat(globalVmOptions, "-XX:+UseCompressedOops", collectorOption, "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("SharedStringsBasic.txt"), "-Xlog:cds,cds+hashtables", extraOption)); --- 116,126 ---- static void testDump(int testCaseNr, String collectorOption, String extraOption, String expectedWarning, boolean expectedToFail) throws Exception { System.out.println("Testcase: " + testCaseNr); OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello"), ! TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("SharedStringsBasic.txt"), "-Xlog:cds,cds+hashtables", extraOption));
*** 143,158 **** // needed, otherwise system considers empty extra option as a // main class param, and fails with "Could not find or load main class" if (!extraOption.isEmpty()) { output = TestCommon.exec(appJar, ! TestCommon.concat(globalVmOptions, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", extraOption, "HelloString")); } else { output = TestCommon.exec(appJar, ! TestCommon.concat(globalVmOptions, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", "HelloString")); } if (expectedWarning != null) { --- 143,158 ---- // needed, otherwise system considers empty extra option as a // main class param, and fails with "Could not find or load main class" if (!extraOption.isEmpty()) { output = TestCommon.exec(appJar, ! TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", extraOption, "HelloString")); } else { output = TestCommon.exec(appJar, ! TestCommon.concat(vmOptionsPrefix, "-XX:+UseCompressedOops", collectorOption, "-Xlog:cds", "HelloString")); } if (expectedWarning != null) {
< prev index next >