Skip to content

Commit 147ed00

Browse files
calvinccheungshipilev
authored andcommitted
8357064: cds/appcds/ArchiveRelocationTest.java failed with missing expected output
Backport-of: 534d2b33dc23d0171fdce3cb89d679d5088b4667
1 parent 304f253 commit 147ed00

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ static void test(boolean run_reloc) throws Exception {
6767
String logArg = "-Xlog:cds=debug,cds+reloc=debug,aot+heap";
6868
String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
6969
String nmtArg = "-XX:NativeMemoryTracking=detail";
70+
String relocMsg1 = "ArchiveRelocationMode == 1: always map archive(s) at an alternative address";
71+
String relocMsg2 = "Try to map archive(s) at an alternative address";
7072

7173
OutputAnalyzer out = TestCommon.dump(appJar,
7274
TestCommon.list(mainClass),
@@ -76,8 +78,10 @@ static void test(boolean run_reloc) throws Exception {
7678
TestCommon.run("-cp", appJar, unlockArg, runRelocArg, logArg, mainClass)
7779
.assertNormalExit(output -> {
7880
if (run_reloc) {
79-
output.shouldContain("ArchiveRelocationMode == 1: always map archive(s) at an alternative address")
80-
.shouldContain("Try to map archive(s) at an alternative address");
81+
if (!output.contains(relocMsg1) && !output.contains(relocMsg2)) {
82+
throw new RuntimeException("Relocation messages \"" + relocMsg1 +
83+
"\" and \"" + relocMsg2 + "\" are missing from the output");
84+
}
8185
} else {
8286
output.shouldContain("ArchiveRelocationMode: 0");
8387
}

0 commit comments

Comments
 (0)