OpenJDK / jdk / jdk
changeset 56374:81134def991d
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
author | ccheung |
---|---|
date | Tue, 24 Sep 2019 20:16:13 -0700 |
parents | c6f8b2c3dc66 |
children | 88fce7eea1f6 |
files | test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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");