Skip to content

Commit db55f92

Browse files
committed
8277343: dynamicArchive/SharedArchiveFileOption.java failed: '-XX:+RecordDynamicDumpInfo is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:' missing
Reviewed-by: hseigel, ccheung
1 parent 2f4b540 commit db55f92

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveTestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ private static String getTempBaseArchive() throws Exception {
291291
* UseCompressedClassPointers options. Those "compressed" options were
292292
* enabled when the default CDS archive was built.
293293
*/
294-
private static boolean isUseSharedSpacesDisabled() {
294+
public static boolean isUseSharedSpacesDisabled() {
295295
return (WB.getBooleanVMFlag("UseSharedSpaces") == false);
296296
}
297297
}

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/SharedArchiveFileOption.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,14 @@ private static void doTest(String baseArchiveName, String topArchiveName) throws
180180
.assertAbnormalExit("-XX:ArchiveClassesAtExit is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:");
181181

182182
testcase("A dynamic archive is already loaded when -XX:+RecordDynamicDumpInfo is specified");
183-
run2(null, topArchiveName,
184-
"-XX:+RecordDynamicDumpInfo",
185-
"-cp", appJar, mainClass)
186-
.assertAbnormalExit("-XX:+RecordDynamicDumpInfo is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:");
183+
if (isUseSharedSpacesDisabled()) {
184+
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.");
185+
} else {
186+
run2(null, topArchiveName,
187+
"-XX:+RecordDynamicDumpInfo",
188+
"-cp", appJar, mainClass)
189+
.assertAbnormalExit("-XX:+RecordDynamicDumpInfo is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:");
190+
}
187191

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

0 commit comments

Comments
 (0)