RFR: 8370201: Test serviceability/sa/TestJhsdbJstackWithVirtualThread.java fails due to VM warnings
Chris Plummer
cjplummer at openjdk.org
Tue Nov 4 15:42:25 UTC 2025
On Fri, 31 Oct 2025 19:25:40 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> There are a number of tests that check that stderr has no output other than deprecation warnings. This is bit overdone and unnecessary. There are command line options such as -XX:+UseLargePages that can result in a warning that has nothing to do with the test. The test should not fail for this reason.
>
> For the SA tests, the main reason for the stderr check is to catch exceptions, warnings, or errors generated by SA tools on stderr. There is no need to fail if there is a VM warning, so switching to stderrShouldBeEmptyIgnoreVMWarnings() should be fine.
>
> For the attach test, the test is trying to instigate a failure by deleting the .java_pid files. Before the bug fix that this test was added for, the jcmd tool would get a com.sun.tools.attach.AttachNotSupportedException and print it on stderr, and also result in an exit value of 1. The test already checks the exit value, so this should be sufficient, but there is no harm in also checking stderr assuming we allow VM warnings, so this test is also switching to stderrShouldBeEmptyIgnoreVMWarnings().
>
> Tested by running all affected tests with -XX:+UseLargePages on hosts that produce a warning message when you do this.
Ping! I'd like to get this pushed as it is causing CI failures.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28091#issuecomment-3486638761
More information about the serviceability-dev
mailing list