test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/PatchJavaBase.java
changeset 49739 00805b129186
parent 48979 514c73a1955b
child 51990 6003e034cdd8
--- a/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/PatchJavaBase.java	Tue Apr 10 10:06:42 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/PatchJavaBase.java	Tue Apr 10 11:43:40 2018 -0700
@@ -62,7 +62,8 @@
             TestCommon.dump(null, null,
                 "--patch-module=java.base=" + moduleJar,
                 "PatchMain", "java.lang.NewClass");
-        TestCommon.checkDump(output, "Loading classes to share");
+        output.shouldHaveExitValue(1)
+              .shouldContain("Cannot use the following option when dumping the shared archive: --patch-module");
 
         TestCommon.run(
             "-XX:+UnlockDiagnosticVMOptions",