diff --git a/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java b/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java index b89ad7e1180eb..985fe23fab244 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, 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 @@ -62,7 +62,8 @@ static void test(boolean run_reloc) throws Exception { String appJar = ClassFileInstaller.getJarPath("hello.jar"); String mainClass = "Hello"; String maybeRelocation = "-XX:ArchiveRelocationMode=0"; - String runRelocArg = run_reloc ? "-showversion" : maybeRelocation; + String alwaysRelocation = "-XX:ArchiveRelocationMode=1"; + String runRelocArg = run_reloc ? alwaysRelocation : maybeRelocation; String logArg = "-Xlog:cds=debug,cds+reloc=debug,cds+heap"; String unlockArg = "-XX:+UnlockDiagnosticVMOptions"; String nmtArg = "-XX:NativeMemoryTracking=detail"; diff --git a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveRelocationTest.java b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveRelocationTest.java index 9e59a33467014..085a380b203dc 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveRelocationTest.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveRelocationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, 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 @@ -80,8 +80,9 @@ static void doTest() throws Exception { String appJar = ClassFileInstaller.getJarPath("hello.jar"); String mainClass = "Hello"; String maybeRelocation = "-XX:ArchiveRelocationMode=0"; - String dumpTopRelocArg = dump_top_reloc ? "-showversion" : maybeRelocation; - String runRelocArg = run_reloc ? "-showversion" : maybeRelocation; + String alwaysRelocation = "-XX:ArchiveRelocationMode=1"; + String dumpTopRelocArg = dump_top_reloc ? alwaysRelocation : maybeRelocation; + String runRelocArg = run_reloc ? alwaysRelocation : maybeRelocation; String logArg = "-Xlog:cds=debug,cds+reloc=debug"; String baseArchiveName = getNewArchiveName("base");