RFR: 8350786: Some java/lang jtreg tests miss requires vm.hasJFR
Alan Bateman
alanb at openjdk.org
Thu Feb 27 08:40:01 UTC 2025
On Wed, 26 Feb 2025 15:47:52 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> While testing a bit with a minimal JVM, it has been noticed that some java/lang jtreg tests use jfr but do not declare it with a "requires vm.hasJFR" ; that leads to test errors in a JVM setup with no JFR .
test/jdk/java/lang/Thread/ThreadSleepEvent.java line 28:
> 26: * @summary Test that Thread.sleep emits a JFR jdk.ThreadSleep event
> 27: * @requires vm.hasJFR
> 28: * @modules jdk.jfr
These tests already have `@modules jdk.jfr` so the tests won't be selected by jtreg to execute when the JDK under test doesn't have this module. I realize `vm.hasJFR` is whether the VM has been built with JFR included but it seems a bit strange to have a JDK containing `jdk.jfr` but not supporting JFR. So I'm curious what is being tested. Is this a run-time image that contains more than one VM, maybe everything in the "server VM" and also the minimal VM?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23805#discussion_r1973117512
More information about the core-libs-dev
mailing list