--- old/test/hotspot/jtreg/runtime/SharedArchiveFile/NonBootLoaderClasses.java 2018-08-10 13:37:52.367259279 -0700 +++ new/test/hotspot/jtreg/runtime/SharedArchiveFile/NonBootLoaderClasses.java 2018-08-10 13:37:52.255259283 -0700 @@ -35,7 +35,6 @@ import jdk.test.lib.cds.CDSTestUtils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; -import java.io.File; public class NonBootLoaderClasses { public static void main(String[] args) throws Exception { @@ -56,11 +55,11 @@ "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./" + archiveName, "-XX:+PrintSharedArchiveAndExit", "-XX:+PrintSharedDictionary"); OutputAnalyzer out = CDSTestUtils.executeAndLog(pb, "print-shared-archive"); - if (!CDSTestUtils.isUnableToMap(out)) { - out.shouldContain("archive is valid") - .shouldHaveExitValue(0) // Should report success in error code. - .shouldContain(PLATFORM_CLASS.replace('/', '.')) - .shouldContain(APP_CLASS.replace('/', '.')); - } + CDSTestUtils.checkMappingFailure(out); + + out.shouldContain("archive is valid") + .shouldHaveExitValue(0) // Should report success in error code. + .shouldContain(PLATFORM_CLASS.replace('/', '.')) + .shouldContain(APP_CLASS.replace('/', '.')); } }