RFR: 8273805: gc/g1/TestGCLogMessages.java test should handle non-JFR configs
Aleksey Shipilev
shade at openjdk.java.net
Thu Sep 16 08:27:52 UTC 2021
On Wed, 15 Sep 2021 10:43:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> JDK-8273147 introduced a more thorough GC messages test, which includes JFR. But it is not guaranteed that JFR is actually in the build, like in the case of Zero:
>
>
> $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=gc/g1/TestGCLogMessages.java
>
> java.lang.RuntimeException: '[debug.*Weak JFR Old Object Samples' missing from stdout/stderr
>
> at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:340)
> at gc.g1.TestGCLogMessages.checkMessagesAtLevel(TestGCLogMessages.java:193)
> at gc.g1.TestGCLogMessages.testNormalLogs(TestGCLogMessages.java:224)
> at gc.g1.TestGCLogMessages.main(TestGCLogMessages.java:199)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
> at java.base/java.lang.Thread.run(Thread.java:833)
>
>
> Luckily, the test already uses `WhiteBox`, so we can just ask if JFR is in the build or not.
>
> Additional testing:
> - [x] Linux x86_64 Zero, affected test now passes
> - [x] Linux x86_64 Server, affected test still passes
> - [x] Linux x86_64 Server, verified the JFR test path is taken
Thanks, I'll integrate now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5529
More information about the hotspot-gc-dev
mailing list