Skip to content

Commit

Permalink
8261830: [lworld] [test] ArchiveRelocationTest compilation failure
Browse files Browse the repository at this point in the history
Reviewed-by: iklam
  • Loading branch information
Roger Riggs committed Feb 16, 2021
1 parent b9d9ca4 commit 3899e11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 6 additions & 8 deletions test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
* @comment JDK-8231610 Relocate the CDS archive if it cannot be mapped to the requested address
* @bug 8231610
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @build HelloRelocation
* @run driver ClassFileInstaller -jar hello.jar HelloRelocation HelloInlineClassApp HelloInlineClassApp$Point HelloInlineClassApp$Point$ref HelloInlineClassApp$Rectangle HelloInlineClassApp$Rectangle$ref
* @build Hello
* @run driver ClassFileInstaller -jar hello.jar Hello
* @run driver ArchiveRelocationTest
*/

Expand Down Expand Up @@ -59,22 +59,20 @@ static void test(boolean run_reloc) throws Exception {
System.out.println("============================================================");

String appJar = ClassFileInstaller.getJarPath("hello.jar");
String mainClass = "HelloRelocation";
String mainClass = "Hello";
String forceRelocation = "-XX:ArchiveRelocationMode=1";
String runRelocArg = run_reloc ? forceRelocation : "-showversion";
String logArg = "-Xlog:cds=debug,cds+reloc=debug";
String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
String nmtArg = "-XX:NativeMemoryTracking=detail";

OutputAnalyzer out = TestCommon.dump(appJar,
TestCommon.list(mainClass,
"HelloInlineClassApp",
"HelloInlineClassApp$Point"),
unlockArg, dumpRelocArg, logArg, nmtArg);
TestCommon.list(mainClass),
unlockArg, logArg, nmtArg);
out.shouldContain("Relocating archive from");

TestCommon.run("-cp", appJar, unlockArg, runRelocArg, logArg, mainClass)
.assertNormalExit(output -> {
.assertNormalExit(output -> {
if (run_reloc) {
output.shouldContain("Try to map archive(s) at an alternative address");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ private static void doTest(String baseArchiveName, String topArchiveName) throws
"-Xlog:cds+dynamic=debug",
"-cp", appJar, mainClass)
.assertNormalExit(output -> {
output.shouldContain("Buffer-space to target-space delta")
.shouldContain("Written dynamic archive 0x");
output.shouldContain("Written dynamic archive 0x");
});
run2(baseArchiveName, topArchiveName,
"-Xlog:class+load",
Expand Down

0 comments on commit 3899e11

Please sign in to comment.