-
Notifications
You must be signed in to change notification settings - Fork 6.1k
JDK-8326496: [test] checkHsErrFileContent support printing hserr in error case #17978
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 mbaesken! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
One minor remark, looks good otherwise.
@@ -63,12 +63,10 @@ public static File openHsErrFileFromOutput(OutputAnalyzer output) { | |||
* if patterns are missing, or if the END marker is missing. | |||
* @param f Input file | |||
* @param patterns An array of patterns that need to match, in that order | |||
* @param verbose If true, the content of the hs-err file is printed while matching. If false, only the matched patterns | |||
* are printed. | |||
* @throws RuntimeException, {@link IOException} |
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.
The Javadoc of parameter "verbose" should not be removed here.
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.
okay I added it again; but it was already not documented in the same way before my change, once "the matched patterns are printed" once "only important information are printed" . Should we adjust it and to what ?
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.
Looking at what "verbose" does, I'd say the correct description would be "only the matched patterns are printed"
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.
Looking at what "verbose" does, I'd say the correct description would be "only the matched patterns are printed"
Mostly correct, but there could be also "Lazily skipping the rest of the hs-err file..." for example; but mostly (almost all) output is about the patterns ("Matches ..." or "Forbidden pattern found ..." ).
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 78 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
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.
Sorry I'm struggling to understand under exactly what conditions the hs_err file will now be printed. Can you give some concrete examples, and why you want to print a potentially very large file as part of the tests main output (which may overflow the jtreg output buffer). Thanks
It will be printed in case the checkHsErrFileContent fails, So we do not have to set 'verbose' and print the content always (because in the successful case it is not really needed) but only in failure case.
I want to print it to see what was wrong with the hserr file content. Especially in the SecondaryErrorTest we had errors where we missed the hserr content to look WHAT exactly was really bad/failing. |
Sorry but when you see an error like:
why does that not suffice? And if it doesn't suffice why don't you just grab the hs_err file from the test artifacts and examine it directly? |
Hi David, we sometimes see error output like this: [2024-02-09T01:23:06.112705412Z] Gathering output for process 47059 So in that case (pattern missing) I'd really like to have the full hs_err file to see what happened. But I agree that for things like Forbidden pattern found, as you mentioned above, one would not need to print the whole hs_err file. Maybe the change could be checked/modified to only print the hs_err content if something is missing? |
Hi David,
For the forbidden patterns it might indeed suffice (however having more information understanding the context of why a forbidden pattern occurs is still often necessary). |
Btw. regarding negative/forbidden patterns, SecondaryErrorTest checks only for positive patterns, so your case does not occur in that test. |
I remain concerned that printing the hs_err file within the log file may actually cause more problems than it fixes. Test environments should gather up all test artifacts for examination upon failure so the actual hs_err file should be available IMO. But if you think you need this ... |
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.
/integrate |
Going to push as commit a065eba.
Your commit was automatically rebased without conflicts. |
checkHsErrFileContent checks hs error files for existance and non-existance of some user provided patterns. However it should also have an option to print the hs_err file in case of a failing check, this would make error analysis easier.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17978/head:pull/17978
$ git checkout pull/17978
Update a local copy of the PR:
$ git checkout pull/17978
$ git pull https://git.openjdk.org/jdk.git pull/17978/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17978
View PR using the GUI difftool:
$ git pr show -t 17978
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17978.diff
Webrev
Link to Webrev Comment