RFR: 8347496: Test jdk/jfr/jvm/TestModularImage.java fails after JDK-8347124: No javac

David Holmes dholmes at openjdk.org
Tue Jan 14 02:54:37 UTC 2025


On Mon, 13 Jan 2025 15:39:19 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> Please review this test-only fix. Apparently there are some test configurations out there that run `jdk/jfr/jvm/TestModularImage.java` with limited modules. Specifically `--limit-modules java.base,jdk.jfr`. For this particular test that is not sufficient to be able to run the test. `TestModularImage.java` uses the `ToolProvider` API to get a hold of `javac` as well as for `jlink` without them being present the test should be skipped.
> 
> I've done that by adding those two required modules in the `@modules` tag.
> 
> Testing:
> - [ ] GHA
> - [x] `jdk/jfr/jvm/TestModularImage.java` with test option `--limit-modules jdk.jfr,java.base` which now skips the test (instead of failing the test). Running `TestModularImage.java` without the `--limit-modules` option and it passes.
> 
> Thoughts?

Looks good. Thanks for fixing!

I agree this was likely always a problem but never observed when run in an agentVM.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23079#pullrequestreview-2548624479


More information about the hotspot-jfr-dev mailing list