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. ------------- Commit messages: - update copyright - Use stderrShouldBeEmptyIgnoreVMWarnings() instead of stderrShouldBeEmptyIgnoreDeprecatedWarnings(). Changes: https://git.openjdk.org/jdk/pull/28091/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28091&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8370201 Stats: 8 lines in 5 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/28091.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28091/head:pull/28091 PR: https://git.openjdk.org/jdk/pull/28091
