--- old/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/Simple.java 2018-04-06 15:40:37.549616934 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/Simple.java 2018-04-06 15:40:37.278591376 -0700 @@ -71,14 +71,15 @@ output.shouldHaveExitValue(1) .shouldContain("Cannot use the following option when dumping the shared archive: --patch-module"); - output = TestCommon.execCommon( + TestCommon.run( "-XX:+UnlockDiagnosticVMOptions", "--patch-module=java.naming=" + moduleJar, "-Xlog:class+load", "-Xlog:class+path=info", - "PatchMain", "javax.naming.spi.NamingManager"); - output.shouldHaveExitValue(0) - .shouldContain("CDS is disabled") - .shouldContain("I pass!"); + "PatchMain", "javax.naming.spi.NamingManager") + .assertSilentlyDisabledCDS(out -> { + out.shouldHaveExitValue(0) + .shouldContain("I pass!"); + }); } }