Skip to content

Commit 6a46d55

Browse files
committed
8353129: CDS ArchiveRelocation tests fail after JDK-8325132
Reviewed-by: iklam, dholmes
1 parent 19eabaf commit 6a46d55

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,8 @@ static void test(boolean run_reloc) throws Exception {
6262
String appJar = ClassFileInstaller.getJarPath("hello.jar");
6363
String mainClass = "Hello";
6464
String maybeRelocation = "-XX:ArchiveRelocationMode=0";
65-
String runRelocArg = run_reloc ? "-showversion" : maybeRelocation;
65+
String alwaysRelocation = "-XX:ArchiveRelocationMode=1";
66+
String runRelocArg = run_reloc ? alwaysRelocation : maybeRelocation;
6667
String logArg = "-Xlog:cds=debug,cds+reloc=debug,cds+heap";
6768
String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
6869
String nmtArg = "-XX:NativeMemoryTracking=detail";

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveRelocationTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -80,8 +80,9 @@ static void doTest() throws Exception {
8080
String appJar = ClassFileInstaller.getJarPath("hello.jar");
8181
String mainClass = "Hello";
8282
String maybeRelocation = "-XX:ArchiveRelocationMode=0";
83-
String dumpTopRelocArg = dump_top_reloc ? "-showversion" : maybeRelocation;
84-
String runRelocArg = run_reloc ? "-showversion" : maybeRelocation;
83+
String alwaysRelocation = "-XX:ArchiveRelocationMode=1";
84+
String dumpTopRelocArg = dump_top_reloc ? alwaysRelocation : maybeRelocation;
85+
String runRelocArg = run_reloc ? alwaysRelocation : maybeRelocation;
8586
String logArg = "-Xlog:cds=debug,cds+reloc=debug";
8687

8788
String baseArchiveName = getNewArchiveName("base");

0 commit comments

Comments
 (0)