-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8333813: Seviceability tests fail due to stderr containing Temporarily processing option UseNotificationThread #19606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Welcome back cjplummer! A progress list of the required criteria for merging this PR into |
/label serviceability |
@plummercj This change is no longer ready for integration - check the PR body for details. |
@plummercj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -176,13 +178,15 @@ public OutputAnalyzer stderrShouldBeEmptyIgnoreWarnings() { | |||
|
|||
/** | |||
* Verify that the stderr contents of output buffer is empty, | |||
* after filtering out the Hotspot deprecation warning messages | |||
* after filtering out the Hotspot deprecation warning messages, | |||
* and warning messages about removal. | |||
* | |||
* @throws RuntimeException | |||
* If stderr was not empty | |||
*/ | |||
public OutputAnalyzer stderrShouldBeEmptyIgnoreDeprecatedWarnings() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be renamed to reflect that it is about VM option warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly. It means updating 15 tests. Also need to come up with a new name. Any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Chris, given these similary named methods in this class, perhaps we should instead just have one single stderrShouldBeEmptyIgnoring(...)
method which takes the messages that should be ignored. Something like:
public static final String VM_WARNING_MSG = ".* VM warning:.*";
public static final String VM_WARNING_DEPRECATED_MSG = ".* VM warning:.* deprecated.*";
...
public OutputAnalyzer stderrShouldBeEmptyIgnoring(String ignoreMsg, String... additionalIgnoreMsgs) {
String stdErrContent = getStderr().replaceAll(ignoreMsg + "\\R", "");
if (additionalIgnoreMsgs != null) {
for (String additionalIgnore : additionalIgnoreMsgs) {
stdErrContent = stdErrContent.replaceAll(additionalIgnore + "\\R", "");
}
}
if (!stdErrContent.isEmpty()) {
reportDiagnosticSummary();
throw new RuntimeException("stderr was not empty");
}
return this;
}
We make those private fields in OutputAnalyzer public and have the caller pass them:
oa.stderrShouldBeEmptyIgnoring(OutputAnalyzer.VM_WARNING_DEPRECATED_MSG)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like a lot of busy work and over abstraction for trying to solve a rather trivial issue that already has a very simple solution, but maybe could use a better API name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, would stderrShouldBeEmptyIgnoreVMOptionDeprecations
be OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong fix. The tests should not be being run with the problematic option. We should not be hiding that by extending the "ignore warnings" support. This is an issue with our CI task definitions.
Allow warning messages such as the following to appear in stderr:
Java HotSpot(TM) 64-Bit Server VM warning: Temporarily processing option UseNotificationThread; support is scheduled for removal in 24.0
Tested by running CI tier5, which reproduced the issue.
Progress
Integration blocker
Issue
Backport <hash>
with the hash of the original commit. See Backports.Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19606/head:pull/19606
$ git checkout pull/19606
Update a local copy of the PR:
$ git checkout pull/19606
$ git pull https://git.openjdk.org/jdk.git pull/19606/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19606
View PR using the GUI difftool:
$ git pr show -t 19606
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19606.diff
Webrev
Link to Webrev Comment