--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/ExportModule.java 2018-04-06 15:40:43.974222788 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/ExportModule.java 2018-04-06 15:40:43.696196569 -0700 @@ -121,18 +121,18 @@ "-Xlog:class+load=trace", "-XX:+PrintSystemDictionaryAtExit", "--module-path", moduleDir.toString(), "--add-modules", TEST_MODULE2, MAIN_CLASS); - TestCommon.checkExecReturn(output, 0, true, "Loading classes to share"); + TestCommon.checkDump(output); // run it using the archive // both the main class and the class from the org.astro module should // be loaded from the archive - output = TestCommon.execCommon("-Xlog:class+load=trace", - "-cp", appJar.toString(), - "--module-path", moduleDir.toString(), - "--add-modules", TEST_MODULE2, MAIN_CLASS); - TestCommon.checkExecReturn(output, 0, true, - "[class,load] org.astro.World source: shared objects file", - "[class,load] com.greetings.Main source: shared objects file"); + TestCommon.run("-Xlog:class+load=trace", + "-cp", appJar.toString(), + "--module-path", moduleDir.toString(), + "--add-modules", TEST_MODULE2, MAIN_CLASS) + .assertNormalExit( + "[class,load] org.astro.World source: shared objects file", + "[class,load] com.greetings.Main source: shared objects file"); String appClasses2[] = {UNNAMED_MAIN, APP_CLASS}; // create an archive with the main class from a non-modular jar in the @@ -147,19 +147,18 @@ "--add-modules", TEST_MODULE2, "--add-exports", "org.astro/org.astro=ALL-UNNAMED", UNNAMED_MAIN); - TestCommon.checkExecReturn(output, 0, true, "Loading classes to share"); + TestCommon.checkDump(output); // both the main class and the class from the org.astro module should // be loaded from the archive - output = TestCommon.execCommon("-Xlog:class+load=trace", - "-cp", appJar2.toString(), - "--module-path", moduleDir.toString(), - "--add-modules", TEST_MODULE2, - "--add-exports", "org.astro/org.astro=ALL-UNNAMED", - UNNAMED_MAIN); - - TestCommon.checkExecReturn(output, 0, true, - "[class,load] org.astro.World source: shared objects file", - "[class,load] com.nomodule.Main source: shared objects file"); + TestCommon.run("-Xlog:class+load=trace", + "-cp", appJar2.toString(), + "--module-path", moduleDir.toString(), + "--add-modules", TEST_MODULE2, + "--add-exports", "org.astro/org.astro=ALL-UNNAMED", + UNNAMED_MAIN) + .assertNormalExit( + "[class,load] org.astro.World source: shared objects file", + "[class,load] com.nomodule.Main source: shared objects file"); } }