8306059: improve the reliability of TestSerialGCWithCDS.java and ArchiveRelocationTest.java tests

Reviewed-by: iklam
This commit is contained in:
Calvin Cheung 2023-04-18 21:23:42 +00:00
parent 0f3828dddd
commit 1b5d35ad2c
2 changed files with 2 additions and 14 deletions
test/hotspot/jtreg/runtime/cds/appcds

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -76,12 +76,6 @@ public class ArchiveRelocationTest {
.assertNormalExit(output -> {
if (run_reloc) {
output.shouldContain("Try to map archive(s) at an alternative address");
if (output.getOutput().contains("Trying to map heap") || output.getOutput().contains("Loaded heap")) {
// The native data in the RO/RW regions have been relocated. If the CDS heap is
// mapped/loaded, we must patch all the native pointers. (CDS heap is
// not supported on all platforms)
output.shouldContain("Patching native pointers in heap region");
}
}
});
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -136,12 +136,6 @@ public class TestSerialGCWithCDS {
"-Xlog:cds,cds+heap",
"-XX:ArchiveRelocationMode=1", // always relocate shared metadata
"Hello");
if (out.getOutput().contains("Trying to map heap") || out.getOutput().contains("Loaded heap")) {
// The native data in the RO/RW regions have been relocated. If the CDS heap is
// mapped/loaded, we must patch all the native pointers. (CDS heap is
// not supported on all platforms)
out.shouldContain("Patching native pointers in heap region");
}
checkExecOutput(dumpWithSerial, execWithSerial, out);
int n = 2;