--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/CustomPackage.java 2018-04-08 23:15:38.501578016 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/CustomPackage.java 2018-04-08 23:15:38.230552475 -0700 @@ -70,7 +70,8 @@ "-Xlog:class+load", "-Xlog:class+path=info", "PatchMain", "javax.naming.myspi.NamingManager"); - TestCommon.checkDump(output, "Preload Warning: Cannot find javax/naming/myspi/NamingManager"); + output.shouldHaveExitValue(1) + .shouldContain("Cannot use the following option when dumping the shared archive: --patch-module"); TestCommon.run( "-XX:+UnlockDiagnosticVMOptions", @@ -78,6 +79,6 @@ "-Xlog:class+load", "-Xlog:class+path=info", "PatchMain", "javax.naming.myspi.NamingManager") - .assertNormalExit("I pass!"); + .assertSilentlyDisabledCDS(0, "I pass!"); } }