< prev index next > test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java
Print this page
/*
- * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024, 2026, 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.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* @summary Test Loading of default archives in all configurations
* @requires vm.cds
* @requires vm.cds.default.archive.available
* @requires vm.cds.write.archived.java.heap
* @requires vm.bits == 64
- * @requires !vm.gc.Z
+ * @requires vm.gc != "Z"
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run driver TestDefaultArchiveLoading coops_nocoh
*/
* @summary Test Loading of default archives in all configurations (requires --enable-cds-archive-coh)
* @requires vm.cds
* @requires vm.cds.default.archive.available
* @requires vm.cds.write.archived.java.heap
* @requires vm.bits == 64
- * @requires !vm.gc.Z
+ * @requires vm.gc != "Z"
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run driver TestDefaultArchiveLoading coops_coh
*/
import jtreg.SkippedException;
public class TestDefaultArchiveLoading {
+ static String archivePreviewSuffix = "";
+
private static String archiveName(String archiveSuffix) {
- return "classes" + archiveSuffix + ".jsa";
+ return "classes" + archiveSuffix + archivePreviewSuffix + ".jsa";
}
private static Path archivePath(String archiveSuffix) {
return Paths.get(System.getProperty("java.home"), "lib",
"server", archiveName(archiveSuffix));
throw new RuntimeException("Expected argument");
}
String archiveSuffix;
char coh, coops;
+ String preview = System.getProperty("test.java.opts", "");
+ if (preview.contains("--enable-preview")) {
+ archivePreviewSuffix = "_preview";
+ }
switch (args[0]) {
case "nocoops_nocoh":
coh = coops = '-';
archiveSuffix = "_nocoops";
< prev index next >