Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/hotspot/jtreg/TEST.ROOT
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ requires.properties= \
container.support \
systemd.support \
jdk.containerized \
jdk.explodedImage \
jlink.runtime.linkable \
jlink.packagedModules \
jdk.static
Expand Down
3 changes: 2 additions & 1 deletion test/hotspot/jtreg/runtime/getSysPackage/GetSysPkgTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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
Expand Down Expand Up @@ -27,6 +27,7 @@
* @modules java.base/jdk.internal.loader
* java.logging
* @requires vm.flagless
* @requires !jdk.explodedImage
* @library /test/lib
* @run driver GetSysPkgTest
*/
Expand Down
2 changes: 2 additions & 0 deletions test/hotspot/jtreg/runtime/modules/ModulesSymLink.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Google Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -27,6 +28,7 @@
* @bug 8220095
* @requires os.family == "linux" | os.family == "mac"
* @requires vm.flagless
* @requires !jdk.explodedImage
* @requires !jdk.static
* @library /test/lib
* @modules java.management
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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
Expand Down Expand Up @@ -27,6 +27,7 @@
* @summary Make sure -Xlog:class+load=info works properly with "modules" jimage,
--patch-module, and with -Xbootclasspath/a
* @requires vm.flagless
* @requires !jdk.explodedImage
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @compile PatchModuleMain.java
Expand Down
15 changes: 15 additions & 0 deletions test/jtreg-ext/requires/VMProps.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public Map<String, String> call() {
map.put("jdk.containerized", this::jdkContainerized);
map.put("vm.flagless", this::isFlagless);
map.put("jdk.foreign.linker", this::jdkForeignLinker);
map.put("jdk.explodedImage", this::explodedImage);
map.put("jlink.packagedModules", this::packagedModules);
map.put("jdk.static", this::isStatic);
vmGC(map); // vm.gc.X = true/false
Expand Down Expand Up @@ -751,6 +752,20 @@ private String jdkContainerized() {
return "" + "true".equalsIgnoreCase(isEnabled);
}

private String explodedImage() {
try {
Path jmodFile = Path.of(System.getProperty("java.home"), "jmods", "java.base.jmod");
if (Files.exists(jmodFile)) {
return Boolean.FALSE.toString();
} else {
return Boolean.TRUE.toString();
}
} catch (Throwable t) {
t.printStackTrace();
return errorWithMessage("Error in explodedImage " + t);
}
}

private String packagedModules() {
// Some jlink tests require packaged modules being present (jmods).
// For a runtime linkable image build packaged modules aren't present
Expand Down