Skip to content

8263549: 8263412 can cause jtreg testlibrary split #2985

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

Closed
wants to merge 5 commits into from

Conversation

iignatev
Copy link
Member

@iignatev iignatev commented Mar 13, 2021

Hi all,

could you please review this dull patch that replaces ClassFileInstaller w/ jdk.test.lib.helpers.ClassFileInstaller in all jtreg test descriptions to ensure we won't get split testlibrary, and removes jdk/test/lib/ClassFileInstaller.java (so it won't be accidentally used).

from JBS:

after JDK-8263412, we might (again) encounter NCDFE b/c parts of testlibraries aren't on the classpath. this happens when jtreg builds jdk.test.lib.helpers.ClassFileInstaller as a part of test-specific code, but ClassFileInstaller as part of shared testibrary directory in one test, when in the following test, jtreg sees ClassFileInstaller in the shared directory, hence javac won't recompile it/its dependencies, but in runtime jdk.test.lib.helpers.ClassFileInstaller is nowhere to be found, hence we get NCDFE.

testing:

  • grep ' ClassFileInstaller[^.]
  • tier1-3

Thanks,
-- Igor


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8263549: 8263412 can cause jtreg testlibrary split

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2985/head:pull/2985
$ git checkout pull/2985

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 13, 2021

👋 Welcome back iignatyev! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title 8263412 8263412: ClassFileInstaller can't be used by classes outside of default package Mar 13, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 13, 2021
@openjdk
Copy link

openjdk bot commented Mar 13, 2021

@iignatev The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot
  • security
  • serviceability
  • shenandoah

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.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org security security-dev@openjdk.org hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Mar 13, 2021
@iignatev iignatev changed the title 8263412: ClassFileInstaller can't be used by classes outside of default package 8263549: ClassFileInstaller can't be used by classes outside of default package Mar 13, 2021
@iignatev iignatev changed the title 8263549: ClassFileInstaller can't be used by classes outside of default package 8263549 Mar 13, 2021
@openjdk openjdk bot changed the title 8263549 8263549: 8263412 can cause jtreg testlibrary split Mar 13, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2021

Webrevs

@iignatev
Copy link
Member Author

note for reviewers: the big part of the patch is just sed -i 's/ ClassFileInstaller / jdk.test.lib.helpers.ClassFileInstaller /g'

Copy link
Member

@iklam iklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this and scanned the differences (with the diff file from the webrev) and it looks reasonable to me.

grep '^[+-]' diff.txt | grep -v Copyright | grep -v '^.[+-]' | less

It looks like most of the changes are mechanical. There were only a few cases where manual changes were made. I trusted that you have tested those cases individually.

But I don't understand why this error can happen. It seems like jtreg would allow two test cases to interfere with each other.

@openjdk
Copy link

openjdk bot commented Mar 13, 2021

@iignatev 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:

8263549: 8263412 can cause jtreg testlibrary split

Reviewed-by: iklam, dcubed

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 4 new commits pushed to the master branch:

  • d339320: 8263136: C4530 was reported from VS 2019 at access bridge
  • a528771: 8262491: AArch64: CPU description should contain compatible board list
  • 86e4c75: 8256156: JFR: Allow 'jfr' tool to show metadata without a recording
  • 0b68ced: 8263548: runtime/cds/appcds/SharedRegionAlignmentTest.java fails to compile after JDK-8263412

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 13, 2021
@iignatev
Copy link
Member Author

iignatev commented Mar 13, 2021

Hi Ioi,

thanks for review this, I ran the whole tier1-3 jobs which should provide enough coverage. as oracle builds don't have AOT feature enabled, I missed a compilation error in IncorrectAOTLibraryTest test. the test failed in GitHub action and should be fixed by 3a3b7a8.

-- Igor

@iklam
Copy link
Member

iklam commented Mar 13, 2021

But I don't understand why this error can happen. It seems like jtreg would allow two test cases to interfere with each other.

The root cause seems to be https://bugs.openjdk.java.net/browse/CODETOOLS-7902847

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I downloaded the patch and used Ioi's cmd pattern to scroll through
the changes. I can't honestly say that I looked at every line since 867
changed files would overwhelm anyone's brain...

I did notice a couple of @run main instead of @run driver calls
to the ClassFileInstaller, but those are pre-existing.

Thumbs up.

@iignatev
Copy link
Member Author

iignatev commented Mar 13, 2021

Hi Dan,

Thanks for your review!

I did notice a couple of @run main instead of @run driver calls to the ClassFileInstaller, but those are pre-existing.

I noticed this too, planning to fix that with a separate RFE.

-- Igor

@iignatev
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Mar 13, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 13, 2021
@openjdk
Copy link

openjdk bot commented Mar 13, 2021

@iignatev Since your change was applied there have been 4 commits pushed to the master branch:

  • d339320: 8263136: C4530 was reported from VS 2019 at access bridge
  • a528771: 8262491: AArch64: CPU description should contain compatible board list
  • 86e4c75: 8256156: JFR: Allow 'jfr' tool to show metadata without a recording
  • 0b68ced: 8263548: runtime/cds/appcds/SharedRegionAlignmentTest.java fails to compile after JDK-8263412

Your commit was automatically rebased without conflicts.

Pushed as commit a7aba2b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@iignatev iignatev deleted the 8263549 branch September 8, 2021 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated security security-dev@openjdk.org serviceability serviceability-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants