On Fri, 31 Oct 2025 19:25:40 GMT, Chris Plummer <[email protected]> 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. Good fix. ------------- Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/28091#pullrequestreview-3418654649
