From 8f0203aa254c2093561005290bc42f123f2b0ec0 Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Tue, 5 Nov 2024 20:34:10 +0100 Subject: [PATCH] Fix SystemModulesTest2 when linkable runtime but no packaged modules --- test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java b/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java index 8e949cfb3a219..6b8185889ad5c 100644 --- a/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java +++ b/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java @@ -81,6 +81,9 @@ void runTest(Helper helper, boolean isLinkableRuntime) throws Exception { .validatingModule("java.base") .addExtraOption("--disable-plugin") .addExtraOption("system-modules"); + if (isLinkableRuntime) { + builder.setLinkableRuntime(); + } Path runtimeImageLinkTarget = createJavaImageRuntimeLink(builder.build()); JImageValidator.validate(runtimeImageLinkTarget.resolve("lib").resolve("modules"), Collections.emptyList(),