-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8337851: Some tests have name which confuse jtreg #20475
Conversation
👋 Welcome back toshiogata! A progress list of the required criteria for merging this PR into |
@toshiogata 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 864 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 (@aivanov-jdk, @prrace, @sormuras) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@toshiogata The following labels 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 lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
@jonathan-gibbons Is this a bug in jtreg, or where these files actually improperly named? |
Not a bug as such, but maybe a little-known misfeature. In the meantime, renaming the files to avoid the problem is the recommended solution. |
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.
since you're renaming this file for jtreg testing anyway could you move the jtreg tags down below the imports and expand the wildcard import?
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.
As you mentioned, it's a good time to make a minor improvement, so I modified the test.
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.
I propose not to edit the renamed files.
First of all, the purpose of this PR is to rename tests to workaround a misfeature of jtreg.
Git does not support renames natively, therefore by editing the renamed files you could break Git ability to detect renaming.
Additionally, these tests are not part of client and I am not aware of the practices in Java Compiler team. Expanding wildcard imports should be fine, yet I would rather avoid editing the renamed files as I mentioned above.
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.
Thank you for pointing it out. I was not aware of the git rename issue.
I changed the fix to only rename files.
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.
Thank you for pointing it out. I was not aware of the git rename issue.
Even if it were not for this Git “limitation”, I still think additional changes should be requested by Java Compiler team. I am not aware of their practices.
@alisenchung knows I'm advocating for expanding imports (whenever a test or source file is modified) and for moving jtreg tags below imports closer to the class declaration. At the same time, we haven't reached an agreement about it, although some people seem to support it too.
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.
With my official jtreg
hat on, I recommend always placing the jtreg
tags immediately after any legal header comments and before any and all of the source code that comprises the test.
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.
With my official
jtreg
hat on, I recommend always placing thejtreg
tags immediately after any legal header comments and before any and all of the source code that comprises the test.
@jonathan-gibbons Are there any disadvantages to placing jtreg tags right before the test class declaration, after all the import statements? It is more convenient when viewing test code in IDE: the jtreg tags are clearly visible. If the tags are after the legal header, they're collapsed together with the legal header (and imports).
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.
There are no technical disadvantages, but I stand by my recommendation to place the test description before any Java code constructions like package, import or type declarations.
We should not change the prevailing style just because of some new prevailing behavior in any given IDE.
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.
move jtreg tags below imports and add copyrights
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 copyright has been intentionally omitted as explained in https://bugs.openjdk.org/browse/JDK-8258525
I moved the jtreg tag.
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.
For the reason aivanov-jdk commented, I would like to only rename files in this PR.
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.
I suggest not to edit the files and only rename them as it was in the first iteration of the review.
This reverts commit 9b30df1.
@aivanov-jdk @alisenchung |
/reviewers 2 reviewer |
@aivanov-jdk |
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 to me.
Someone from the compiler team has to approve it too.
All the changes look good, however, only one test, URLDragTest.java
, is from the client area.
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.
Some one else should decide bout the langtools changes but for the AWT one I agree the minimal rename is all we need here to solve the specific problem which has nothing to do with the test itself.
Moving files from one directory to another can sometimes be a bit risky, especially for Please confirm that all tests under |
Filed https://bugs.openjdk.org/browse/CODETOOLS-7903803 |
@jonathan-gibbons
|
@jonathan-gibbons |
@toshiogata Jon Gibbons is no longer working on Oracle. I can't say if that means he will no longer be active at all in the OpenJDK community, but you might want to lower your expectations of getting a reply, and I suggest proceeding with this PR without awaiting a response from him. |
I'm still around, and working to regain access to participate in OpenJDK, albeit at a significantly reduced level. |
I see this is already approved/"ready". I see no reason to disagree with that. |
@magicus @jonathan-gibbons |
/integrate |
@toshiogata |
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.
Renames/moves look also good to me, thus I'll sponsor this PR.
/sponsor |
Going to push as commit e6698f5.
Your commit was automatically rebased without conflicts. |
@sormuras @toshiogata Pushed as commit e6698f5. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
/backport jdk23u |
@toshiogata To use the |
Rename the tests to prevent unexpected deletion of result files when
-retain
jtreg option is specified.Testing: modified tests
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20475/head:pull/20475
$ git checkout pull/20475
Update a local copy of the PR:
$ git checkout pull/20475
$ git pull https://git.openjdk.org/jdk.git pull/20475/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20475
View PR using the GUI difftool:
$ git pr show -t 20475
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20475.diff
Webrev
Link to Webrev Comment