--- a/test/hotspot/jtreg/runtime/SharedArchiveFile/NonBootLoaderClasses.java Wed Aug 15 14:35:33 2018 +0200
+++ b/test/hotspot/jtreg/runtime/SharedArchiveFile/NonBootLoaderClasses.java Wed Aug 15 10:00:16 2018 -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('/', '.'));
}
}