On Wed, 26 Aug 2026 08:37:11 GMT, Dušan Bálek <[email protected]> wrote:

> Running `JLinkToolProviderTest` on a JDK built with 
> `--enable-linkable-runtime` fails with the following error:
> 
> java.lang.AssertionError: 1:Error: jlink does not support linking from the 
> run-time image when running on a patched runtime with --patch-module:
> at JLinkToolProviderTest.checkConcurrentAccess(JLinkToolProviderTest.java:69)
> at JLinkToolProviderTest.main(JLinkToolProviderTest.java:78)
> ...
> 
> The test invokes `jlink` through `ToolProvider`. Its default agent-VM 
> execution runs on a patched runtime, which `jlink` does not support when 
> linking from the run-time image.
> 
> The proposed fix changes the test’s jtreg action from `main` to 
> `main/othervm`, so the `ToolProvider` invocation runs in a fresh, unpatched 
> VM.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Marked as reviewed by alanb (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/32531#pullrequestreview-5037933000

Reply via email to