8204701: [TESTBUG] runtime/SharedArchiveFile/BootAppendTests.java should handle mapping failure
authormseledtsov
Wed, 20 Jun 2018 09:42:36 -0700
changeset 50679 58dac477766c
parent 50678 818a23db260c
child 50680 dd2ebc050e6e
child 50682 9663777e8d41
8204701: [TESTBUG] runtime/SharedArchiveFile/BootAppendTests.java should handle mapping failure Summary: Added code to check for mapping failure Reviewed-by: ccheung, jiangli
test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java
--- a/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java	Wed Jun 20 17:15:16 2018 +0200
+++ b/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java	Wed Jun 20 09:42:36 2018 -0700
@@ -166,9 +166,10 @@
                            APP_CLASS, BOOT_APPEND_DUPLICATE_MODULE_CLASS_NAME);
 
             String MATCH_PATTERN = ".class.load. javax.annotation.processing.FilerException source:.*bootAppend.jar*";
-            OutputAnalyzer out = CDSTestUtils.runWithArchive(opts);
-            out.shouldHaveExitValue(0)
-                       .shouldNotMatch(MATCH_PATTERN);
+            CDSTestUtils.run(opts)
+                .assertNormalExit(out -> {
+                    out.shouldNotMatch(MATCH_PATTERN);
+                });
         }
     }