Skip to content

Commit

Permalink
8277343: dynamicArchive/SharedArchiveFileOption.java failed: '-XX:+Re…
Browse files Browse the repository at this point in the history
…cordDynamicDumpInfo is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:' missing

Reviewed-by: hseigel, ccheung
  • Loading branch information
iklam committed Nov 18, 2021
1 parent 2f4b540 commit db55f92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Expand Up @@ -291,7 +291,7 @@ private static String getTempBaseArchive() throws Exception {
* UseCompressedClassPointers options. Those "compressed" options were
* enabled when the default CDS archive was built.
*/
private static boolean isUseSharedSpacesDisabled() {
public static boolean isUseSharedSpacesDisabled() {
return (WB.getBooleanVMFlag("UseSharedSpaces") == false);
}
}
Expand Up @@ -180,10 +180,14 @@ private static void doTest(String baseArchiveName, String topArchiveName) throws
.assertAbnormalExit("-XX:ArchiveClassesAtExit is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:");

testcase("A dynamic archive is already loaded when -XX:+RecordDynamicDumpInfo is specified");
run2(null, topArchiveName,
"-XX:+RecordDynamicDumpInfo",
"-cp", appJar, mainClass)
.assertAbnormalExit("-XX:+RecordDynamicDumpInfo is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:");
if (isUseSharedSpacesDisabled()) {
System.out.println("This test is not applicable when JTREG tests are executed with -Xshare:off, or if the JDK doesn't have a default archive.");
} else {
run2(null, topArchiveName,
"-XX:+RecordDynamicDumpInfo",
"-cp", appJar, mainClass)
.assertAbnormalExit("-XX:+RecordDynamicDumpInfo is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:");
}

testcase("-XX:+RecordDynamicDumpInfo cannot be used with -XX:ArchiveClassesAtExit");
dump2(baseArchiveName,
Expand Down

1 comment on commit db55f92

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.