-
Notifications
You must be signed in to change notification settings - Fork 127
8371897: [lworld] CLONE - VerifyJimage test incorrectly skips all tests when comparing directory structure #1737
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 david-beaumont! A progress list of the required criteria for merging this PR into |
|
@david-beaumont 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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the 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 (@RogerRiggs, @liach) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
RogerRiggs
left a comment
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 |
|
@david-beaumont |
| } | ||
| } | ||
| pool.shutdown(); | ||
| if (!pool.awaitTermination(20, TimeUnit.SECONDS)) { |
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.
Beware that this may time out on debug configurations. If this doesn't time out on mainline I would assume this is ok.
|
Looks like the timeout concern is redundant. Good to go. /sponsor |
|
Going to push as commit 63a6221.
Your commit was automatically rebased without conflicts. |
|
@liach @david-beaumont Pushed as commit 63a6221. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Rewrite of VerifyJimage test to fix several severe issues.
This test runs in two modes, one of which is completely broken (but claims to pass) and the other which currently works but must be made compatible with up-coming preview mode changes from Valhalla.
Issue 1: Broken file comparison
This is a mode not currently run by default, but very very broken if it is run manually. It creates incorrect entry names for looking into the jimage and then ignores non existent entries without raising a failure. This code must have been broken since the introduction of BasicImageReader and the modules system.
This is the larger part of the VerifyJimage code, and it was never going to be worth keeping much of the existing code, so I wrote a new nested class (DirectoryContentVerifier) to encapsulate it.
Importantly, this version now checks false positives and false negatives for file comparison, ensuring that "true failure" cannot be silently ignored. The set of entries in the jimage which have been handled is recorded, and a check is made that all entries have either been tested or explicitly ignored.
Issue 2: Use of BasicImageReader for class file reading
A relative small part of the original code, this mode was reading class names via BasicImageReader and attempting to load them. This approach works now, but will fail when preview mode is introduced since preview versions of classes must be loaded when the JVM is run in preview mode.
The best way to get "the current set of classes in the jimage" is to enumerate the jrt:/ file-system for the runtime image (which will account for preview mode when it's introduced). So the new code in ClassLoadingVerifier does this.
Issue 3: File comparison mode was never run by default
This is likely why the broken file comparison mode wasn't discovered for years. I added two test stanzas to VerifyJimage, so that both modes are run (if possible). Some care is needed because in CI testing there are no module directories for the file comparison mode, and this should not cause a test failure.
This is a clone of openjdk/jdk#28265
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1737/head:pull/1737$ git checkout pull/1737Update a local copy of the PR:
$ git checkout pull/1737$ git pull https://git.openjdk.org/valhalla.git pull/1737/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1737View PR using the GUI difftool:
$ git pr show -t 1737Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1737.diff
Using Webrev
Link to Webrev Comment