-
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
8273774: CDSPluginTest should only expect classes_nocoops.jsa exists on supported 64-bit platforms #5519
Conversation
Hi @1996scarlet, 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 1996scarlet" 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 |
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! |
@1996scarlet 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. |
Webrevs
|
The test assumes that it always runs on 64-bit platform and Platform::is64Bit can do better for runtime platform (i.e. |
125c83e
to
5ec04d4
Compare
Thanks for making the change, Remilia. @calvinccheung is the author of CDSPlugin and this test, who should review this fix. My suggestion checking on x64 or aarch64 works for the issue you run into but it would fail again when running on a JDK where CDSPlugin does not support for example Having a second thought, it would be a better fix for CDSPluginTest to simply skip running if default CDS archive is not supported. There is a method
|
The fix in the test case seems fine to me. |
|
@1996scarlet 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 24 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 (@calvinccheung, @mlchung) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
This test may fail in other cases. We should prepare for those cases in this fix:
Calvin suggests to throw SkippedException in an offline chat. |
I just noticed there was a bug fix JDK-8269840 (Update Platform.isDefaultCDSArchiveSupported() to return true for aarch64 platforms). So the second condition in the above is not necessary.
|
5ec04d4
to
587aeec
Compare
Please reexamine the change. |
} else { | ||
helper.checkImage(image, module, null, null, | ||
new String[] { subDir + "classes.jsa" }); | ||
} |
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 above change checking 64-bit platform should not be needed. On an unknown platform, isDefaultCDSArchiveSupported
should return false. It only returns true on 64-bit supported platforms. Can you verfiy?
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 just try it on LoongArch64 and mips64el.
The Platform.isDefaultCDSArchiveSupported()
returns true.
So the above checking can not be removed.
Also, I just forgot add import jtreg.SkippedException
.
…on supported 64-bit platforms
587aeec
to
503406b
Compare
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.
Thanks for the change.
/integrate |
@1996scarlet |
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 and thanks for fixing this bug.
/sponsor |
Going to push as commit 8302061.
Your commit was automatically rebased without conflicts. |
@calvinccheung @1996scarlet Pushed as commit 8302061. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The test assumes that it always runs on 64-bit platform and classes_nocoops.jsa is always created.
It's a test bug. The test should only expect classes_nocoops.jsa exists if it's running on a supported 64-bit platform.
However, for unknown target platform, it's unknown if it's 64-bit or not.
This patch fix the test to check if classes_nocoops.jsa exists only on one of the JDK supported platforms (x64 or aarch64) via the sun.arch.data.model system property.
Please review this change. Thanks!
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5519/head:pull/5519
$ git checkout pull/5519
Update a local copy of the PR:
$ git checkout pull/5519
$ git pull https://git.openjdk.java.net/jdk pull/5519/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5519
View PR using the GUI difftool:
$ git pr show -t 5519
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5519.diff