Skip to content
Permalink
Browse files
8261830: [lworld] [test] ArchiveRelocationTest compilation failure
Reviewed-by: iklam
  • Loading branch information
Roger Riggs committed Feb 16, 2021
1 parent b9d9ca4 commit 3899e114a8f63d7b22886f63eecc78492861a05a
Showing 2 changed files with 7 additions and 10 deletions.
@@ -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
*/

@@ -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");
}
@@ -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",

0 comments on commit 3899e11

Please sign in to comment.