RFR: 8365436: ImageReaderTest fails when jmods directory not present

David Beaumont duke at openjdk.org
Thu Aug 14 15:33:18 UTC 2025


On Thu, 14 Aug 2025 09:21:41 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Switched from TestSkippedException (not honoured by JUnit) to TestAbortedException (via Assumptions class) to avoid false negative test "failure". Note that now, the test is either shown as skipped, or passed, depending on which report is being looked at. Tweaked error message slightly since using an "exploded image" isn't the only cause.
>
> test/jdk/jdk/internal/jimage/ImageReaderTest.java line 227:
> 
>> 225:         // This may be reporting as a skipped test, or a pass, depending
>> 226:         // on how the test was run.
>> 227:         Assumptions.assumeTrue(helper != null, "Cannot create test helper (no jimage file)");
> 
> There is a jimage file,  Helper.newHelper is returning null because there are no packaged modules in the runtime image (= no jmods directory).
> 
> In passing, tests.Helper is the supporting class for the jlink tests. We should rename it or create a sub-directory in test/jdk/tools/lib/tests as the location/naming just won't work for this very specific class.

The other PR on the bug (https://github.com/openjdk/jdk/pull/26774/files) changes the comment.
Happy for a more specific wording though.
This PR is likely redundant now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26773#discussion_r2276971391


More information about the core-libs-dev mailing list