From a2723d91dfba2850e3070083fa94dc3fecc46a00 Mon Sep 17 00:00:00 2001 From: Matias Saavedra Silva Date: Wed, 4 Jun 2025 14:16:20 +0000 Subject: [PATCH] 8345347: Test runtime/cds/TestDefaultArchiveLoading.java should accept VM flags or be marked as flagless Reviewed-by: lmesnik, stefank, ccheung --- .../jtreg/runtime/cds/TestDefaultArchiveLoading.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java b/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java index ddc3603b16d..d90618b51f2 100644 --- a/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java +++ b/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2024, Red Hat, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -26,6 +26,7 @@ * @test id=nocoops_nocoh * @summary Test Loading of default archives in all configurations * @requires vm.cds + * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib * @modules java.base/jdk.internal.misc @@ -37,6 +38,7 @@ * @test id=nocoops_coh * @summary Test Loading of default archives in all configurations (requires --enable-cds-archive-coh) * @requires vm.cds + * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib * @modules java.base/jdk.internal.misc @@ -48,6 +50,7 @@ * @test id=coops_nocoh * @summary Test Loading of default archives in all configurations * @requires vm.cds + * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib * @modules java.base/jdk.internal.misc @@ -59,6 +62,7 @@ * @test id=coops_coh * @summary Test Loading of default archives in all configurations (requires --enable-cds-archive-coh) * @requires vm.cds + * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib * @modules java.base/jdk.internal.misc @@ -131,7 +135,7 @@ public class TestDefaultArchiveLoading { default: throw new RuntimeException("Invalid argument " + args[0]); } - ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder( + ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder( "-XX:" + coh + "UseCompactObjectHeaders", "-XX:" + coops + "UseCompressedOops", "-Xlog:cds",