-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8279669: test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition #6652
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
Hi @zzambers, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user zzambers" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
/covered @zzambers works for Red Hat and should be covered by the Red Hat OCA. |
/covered |
Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
@zzambers This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@robilad Could you please OCA check this, please? |
err, nvm. I see those labels have been removed. Sorry for the noise. |
@zzambers I've filed https://bugs.openjdk.java.net/browse/JDK-8279669 for this. Please mention it in the PR title so that the bots can properly link the issue. See the jcheck message. Then it should be ready for review. |
@zzambers See the "Integration Blocker" message above. I.e. fix the PR title to match the bug title, thanks. |
@zzambers 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 444 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@alexmenkov, @sspitsyn) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
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.
Hi @zzambers,
Thank you for taking care about this!
The fix looks good.
Thanks,
Serguei
@zzambers please integrate this (see bot comment above) and I'll sponsor the push for you. |
/integrate |
/sponsor |
Going to push as commit 4c52eb3.
Your commit was automatically rebased without conflicts. |
@jerboaa @sspitsyn @alexmenkov thanks for help and reviews |
@zzambers do you plan to backport these changes to the old releases and to the jdk8 where this test started to fail? |
@mrserb, I have just created jdk8 backport yesterday and I will probably do other ones soon. Sorry for the delay. |
/backport jdk17u-dev |
@zzambers Unknown command |
@jerboaa thanks, I was wondering why it did not work. But turned out, that I don't have required role for that anyway, so I did it manual way. :) |
Condition is obviously wrong, because if name starts with "java." other 2 conditions are always true. Intent, as I understand it, was to redefine class where debug event took place (in case of test classes), unless it took place in class of jdk itself, in which case redefine test's main class (if redefineAtEvents is true of course). Check for class names starting with "jdk." was added with later commit [1], not touching that wrong condition (check for classes belonging to jdk) and putting check to else branch instead (therefore not doing any redefinition in case name starts with "jdk.").
Actually fix is done to be then backported to jdk8u, where com/sun/jdi/RedefineCrossEvent.java test stared failing after recent backport [2], due to missing check for classes starting with "jdk." [3]:
...
Redefining class jdk.internal.misc.TerminatingThreadLocal (no class loader)
FAIL: redefine - unexpected exception: java.io.FileNotFoundException: /home/tester/test.1638289866/jdk/JTwork/classes/com/sun/jdi/jdk/internal/misc/TerminatingThreadLocal.class (No such file or directory)
...
This test actually passes for (latest) jdk. However fixing this condition before doing backport, rather than backporting it in current form seems like right thing to do. I tested this locally and jdi tests are passing with this change for latest jdk (and also for jdk8u).
[1] zzambers@4268737#diff-778880449f85966d3c6b219b8ceb41fdbbe7acc5e520d2aa27aada3f33bf1eab
[2] https://bugs.openjdk.java.net/browse/JDK-8273772
[3] https://github.com/openjdk/jdk8u/blob/7d3c0bede34930cadd76644e58bf56f2a83c3d01/jdk/test/com/sun/jdi/TestScaffold.java#L535
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6652/head:pull/6652
$ git checkout pull/6652
Update a local copy of the PR:
$ git checkout pull/6652
$ git pull https://git.openjdk.java.net/jdk pull/6652/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6652
View PR using the GUI difftool:
$ git pr show -t 6652
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6652.diff