8235490: AppCDS DynamicArchiveRelocationTest.java failed: 'always map archive(s) at an alternative address' missing

Reviewed-by: coleenp, ccheung
This commit is contained in:
Ioi Lam 2019-12-09 09:59:03 -08:00
parent ade72f4965
commit 749bda0e2d
3 changed files with 3 additions and 2 deletions

View File

@ -2052,6 +2052,7 @@ void MetaspaceShared::initialize_runtime_shared_and_meta_spaces() {
if (result == MAP_ARCHIVE_MMAP_FAILURE) {
// Mapping has failed (probably due to ASLR). Let's map at an address chosen
// by the OS.
log_info(cds)("Try to map archive(s) at an alternative address");
result = map_archives(static_mapinfo, dynamic_mapinfo, false);
}
}

View File

@ -80,7 +80,7 @@ public class ArchiveRelocationTest {
TestCommon.run("-cp", appJar, unlockArg, runRelocArg, logArg, mainClass)
.assertNormalExit(output -> {
if (run_reloc) {
output.shouldContain("ArchiveRelocationMode == 1: always map archive(s) at an alternative address");
output.shouldContain("Try to map archive(s) at an alternative address");
}
});
}

View File

@ -88,7 +88,7 @@ public class DynamicArchiveRelocationTest extends DynamicArchiveTestBase {
String baseArchiveName = getNewArchiveName("base");
String topArchiveName = getNewArchiveName("top");
String runtimeMsg = "ArchiveRelocationMode == 1: always map archive(s) at an alternative address";
String runtimeMsg = "Try to map archive(s) at an alternative address";
String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
// (1) Dump base archive (static)