Skip to content

Commit

Permalink
8323032: OptimizedModuleHandlingTest failed in dynamic CDS archive mode
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes, matsaave
  • Loading branch information
calvinccheung committed Jan 8, 2024
1 parent ca9635d commit 61ebe3b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
1 change: 0 additions & 1 deletion test/hotspot/jtreg/ProblemList.txt
Expand Up @@ -113,7 +113,6 @@ runtime/StackGuardPages/TestStackGuardPagesNative.java 8303612 linux-all
runtime/ErrorHandling/TestDwarf.java#checkDecoder 8305489 linux-all
runtime/ErrorHandling/MachCodeFramesInErrorFile.java 8313315 linux-ppc64le
runtime/cds/appcds/customLoader/HelloCustom_JFR.java 8241075 linux-all,windows-x64
runtime/cds/appcds/jigsaw/modulepath/OptimizeModuleHandlingTest.java 8323032 generic-all

applications/jcstress/copy.java 8229852 linux-all

Expand Down
Expand Up @@ -345,20 +345,26 @@ public static void runWithJarPath(String... extraRuntimeArgs) throws Exception {
.shouldNotContain(OPTIMIZE_ENABLED)
.shouldContain(MAP_FAILED);
});
// Dump an archive with only -Xbootclasspath/a
output = TestCommon.createArchive(
null,
appClasses,
"-Xbootclasspath/a:" + mainJar.toString());
TestCommon.checkDump(output);
tty("13. run with CDS on, with the same -Xbootclasspath/a as dump time and adding a -cp with test.jar: should pass");
TestCommon.run("-Xlog:cds,class+load",
"-cp", testJar.toString(),
"-Xbootclasspath/a:" + mainJar.toString(),
MAIN_CLASS)
.assertNormalExit(out -> {
out.shouldMatch(MAIN_FROM_CDS)
.shouldContain(OPTIMIZE_ENABLED);

// Skip the following test for dynamic CDS archive because the current
// dynamic dump test utililty does not support empty -cp with a classlist.
// (see createArchive(CDSOptions opts) in TestCommon.java)
if (!CDSTestUtils.isDynamicArchive()) {
// Dump an archive with only -Xbootclasspath/a
output = TestCommon.createArchive(
null,
appClasses,
"-Xbootclasspath/a:" + mainJar.toString());
TestCommon.checkDump(output);
tty("13. run with CDS on, with the same -Xbootclasspath/a as dump time and adding a -cp with test.jar: should pass");
TestCommon.run("-Xlog:cds,class+load",
"-cp", testJar.toString(),
"-Xbootclasspath/a:" + mainJar.toString(),
MAIN_CLASS)
.assertNormalExit(out -> {
out.shouldMatch(MAIN_FROM_CDS)
.shouldContain(OPTIMIZE_ENABLED);
});
}
}
}

1 comment on commit 61ebe3b

@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.