--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/SubClassOfPatchedClass.java 2018-04-06 15:48:23.641569547 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/SubClassOfPatchedClass.java 2018-04-06 15:48:23.319539180 -0700 @@ -88,7 +88,8 @@ "--patch-module=java.naming=" + moduleJar, "-Xlog:class+load", "PatchMain", "javax.naming.Reference", "mypackage.MyReference"); - TestCommon.checkDump(output, "Loading classes to share"); + output.shouldHaveExitValue(1) + .shouldContain("Cannot use the following option when dumping the shared archive: --patch-module"); String classPath = appJar + File.pathSeparator + classDir; System.out.println("classPath: " + classPath); @@ -98,8 +99,10 @@ "--patch-module=java.naming=" + moduleJar, "-Xlog:class+load", "PatchMain", "javax.naming.Reference", "mypackage.MyReference") - .assertNormalExit( - "I pass!", - "MyReference source: file:"); + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0) + .shouldContain("MyReference source: file:") + .shouldContain("I pass!"); + }); } }