--- old/test/hotspot/jtreg/runtime/appcds/SharedArchiveFile.java 2018-04-25 23:40:03.826644543 -0400 +++ new/test/hotspot/jtreg/runtime/appcds/SharedArchiveFile.java 2018-04-25 23:40:02.458565445 -0400 @@ -41,35 +41,12 @@ public class SharedArchiveFile { public static void main(String[] args) throws Exception { - boolean isProduct = !Platform.isDebugBuild(); String appJar = JarBuilder.getOrCreateHelloJar(); - // 1) Dumping -XX:SharedArchiveFile without -XX:+UseAppCDS should - // succeed with all binary. + // Dumping -XX:SharedArchiveFile should succeed with all binary. ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, "-cp", appJar, "-XX:SharedArchiveFile=./SharedArchiveFile.jsa", "-Xshare:dump"); OutputAnalyzer out = CDSTestUtils.executeAndLog(pb, "dump"); out.shouldContain("Dumping"); - - // 2) Using -XX:SharedArchiveFile with -XX:+UseAppCDS should work - // on product binary by default. - OutputAnalyzer output3 = TestCommon.dump(appJar, TestCommon.list("Hello")); - output3.shouldContain("Dumping"); - output3 = TestCommon.exec(appJar, "Hello"); - TestCommon.checkExec(output3, "Hello World"); - - // 3) Using -XX:+UseAppCDS should not affect other diagnostic flags, - // such as LogEvents - OutputAnalyzer output4 = TestCommon.exec(appJar, "-XX:+LogEvents", "Hello"); - if (isProduct) { - output4.shouldContain("Error: VM option 'LogEvents' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions."); - } else { - TestCommon.checkExec(output4, "Hello World"); - } - - // 4) 8066921 - Extra -XX:+UseAppCDS - TestCommon.testDump(appJar, TestCommon.list("Hello"), "-XX:+UseAppCDS"); - OutputAnalyzer output5 = TestCommon.exec(appJar, "-XX:+UseAppCDS", "Hello"); - TestCommon.checkExec(output5); } }