-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8337299: vmTestbase/nsk/jdb/stop_at/stop_at002/stop_at002.java failure goes undetected #20366
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 |
The test is testing to make sure a jdb deferred breakpoint on an inner class works. The breakpoint line number information for the debuggee is wrong, so the test should be failing, but isn't. The debugger side has:
And the debuggee side has:
and
However line numbers (even the ones in the comments) are wrong. They probably have been ever since this file was open sourced and the new copyright header was added. As a result, in the jdb out you see failures like: [17:24:22.782] reply[0]: > Unable to set deferred breakpoint nsk.jdb.stop_at.stop_at002.stop_at002a$Nested$DeeperNested$DeepestNested:43 : No code at line 43 in nsk.jdb.stop_at.stop_at002.stop_at002a$Nested$DeeperNested$DeepestNested However, this is not caught by the test. The test only checks for the failed setting of the deferred breakpoint when executing the jdb "stop at" command. The failure does not actually happen until after the test continues, allowing the class to be loaded and for jdb to actually attempt to set the breakpoint. So there are two issues with the test: wrong breakpoint line number information, and failure to determine that a deferred breakpoint failed to be setup when the class was loaded. |
@plummercj 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 114 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 |
@plummercj The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
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 looks good. I've posted one question.
return false; | ||
} | ||
|
||
found = grep.findFirst("Breakpoint hit: \"thread=main\", "); |
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.
Q: Is it possible to check for the exact breakpoint location 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.
The problem is in the test we have:
static final String DEBUGGEE_LOCATION2 = DEBUGGEE_CLASS + "$Inner$MoreInner:78";
And the jdb output is:
reply[2]: Breakpoint hit: "thread=main", nsk.jdb.stop_at.stop_at002.stop_at002a$Inner$MoreInner.foo(), line=78 bci=0
So I can't just search for DEBUGGEE_LOCATION2 in the output. I could do further factoring of DEBUGGEE_LOCATION2 so it is easier to construct a search pattern that would work, but I don't feel it is worth it.
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, thanks.
Thanks for the reviews Alex and Serguei! /integrate |
Going to push as commit e2c07d5.
Your commit was automatically rebased without conflicts. |
@plummercj Pushed as commit e2c07d5. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The test is setting breakpoints on the wrong line numbers, which causes setting up the breakpoint to fail, but the test also has buggy error checking, so the test doesn't detect the failures and still passes. I fixed the breakpoint line numbers and the error checking. More details in the first comment.
Testing: tier5 svc CI testing, which includes this test suite.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20366/head:pull/20366
$ git checkout pull/20366
Update a local copy of the PR:
$ git checkout pull/20366
$ git pull https://git.openjdk.org/jdk.git pull/20366/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20366
View PR using the GUI difftool:
$ git pr show -t 20366
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20366.diff
Webrev
Link to Webrev Comment