--- old/test/hotspot/jtreg/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java 2018-08-10 13:37:52.079259288 -0700 +++ new/test/hotspot/jtreg/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java 2018-08-10 13:37:51.963259291 -0700 @@ -50,10 +50,10 @@ CDSTestUtils.checkDump(out); out = CDSTestUtils.runWithArchive(loadCompactStringsArgument); - if (!CDSTestUtils.isUnableToMap(out)) { - out.shouldMatch("The shared archive file's CompactStrings " + - "setting .* does not equal the current CompactStrings setting") - .shouldHaveExitValue(1); - } + CDSTestUtils.checkMappingFailure(out); + + out.shouldMatch("The shared archive file's CompactStrings " + + "setting .* does not equal the current CompactStrings setting") + .shouldHaveExitValue(1); } }