# HG changeset patch # User ccheung # Date 1569381373 25200 # Node ID 81134def991d2ecba66828d703bb385e253a2e2a # Parent c6f8b2c3dc66d0bf94370386df039bd423a24b9d 8231097: [TESTBUG] runtime/cds/appcds/DirClasspathTest.java can fail with a mapping error Summary: Check output for mapping failure and throw a SkippedException. Reviewed-by: iklam, dholmes diff -r c6f8b2c3dc66 -r 81134def991d test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java --- a/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java Tue Sep 24 18:25:54 2019 -0700 +++ b/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java Tue Sep 24 20:16:13 2019 -0700 @@ -242,7 +242,12 @@ if (opts.appJarDir != null) { pb.directory(new File(opts.appJarDir)); } - return executeAndLog(pb, "dump"); + + OutputAnalyzer output = executeAndLog(pb, "dump"); + if (DYNAMIC_DUMP && isUnableToMap(output)) { + throw new SkippedException(UnableToMapMsg); + } + return output; } // This allows you to run the AppCDS tests with JFR enabled at runtime (though not at @@ -462,9 +467,6 @@ String... suffix) throws Exception { OutputAnalyzer output = dump(appJar, classList, suffix); if (DYNAMIC_DUMP) { - if (isUnableToMap(output)) { - throw new SkippedException(UnableToMapMsg); - } output.shouldContain("Written dynamic archive"); } else { output.shouldContain("Loading classes to share"); @@ -477,9 +479,6 @@ String... suffix) throws Exception { OutputAnalyzer output = dump(appJarDir, appJar, classList, suffix); if (DYNAMIC_DUMP) { - if (isUnableToMap(output)) { - throw new SkippedException(UnableToMapMsg); - } output.shouldContain("Written dynamic archive"); } else { output.shouldContain("Loading classes to share");