-
Notifications
You must be signed in to change notification settings - Fork 145
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
8305329: [8u] Unify test libraries into single test library - step 1 #294
Conversation
👋 Welcome back zzambers! A progress list of the required criteria for merging this PR into |
Webrevs
|
@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! |
@zzambers This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
/open |
@zzambers This pull request is now open |
@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! |
This is something I'm aware of and I've thought about tackling it in a similar way to you a few times. Thanks for finding the time to do so which has eluded me so far. I don't have any real issue with this PR, but then I guess this is the easy one. I'm a bit concerned about steps 2 & 3, because you seem to be suggesting that the existing HotSpot & JDK test libraries should be migrated to work with the ones from the JFR library. This seems like the wrong direction to me and a lot more work than migrating the JFR ones to work with the existing libraries (which is what the JFR backport should have done in the first place). As you say yourself, some of the JFR imported library code doesn't even compile and it includes stuff for newer JDKs which isn't appropriate in 8u. This PR would seem like a good opportunity to remove rather than move any of these files that don't compile (which presumably also means they aren't being used by the JFR tests). Have you verified that all the moved files actually compile? And if not, can we check that and delete any that don't? Then, in the HotSpot stage, we can merge in the HotSpot library and replace any duplicates with the 8u versions, and see what (if anything) breaks in the JFR tests. |
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.
Should have put my above comment under a review...
I think we should also probably have a step 4 to actually move the tests. That will then solve the backporting problem where tests keep being introduced in the wrong location. |
Hi @gnu-andrew,
I haven't looked in too much detail, on how they should be merged, but probably on case by case basis. I think, in case of some more generic classes, rather than trying to merge
I have not excluded any files, just moved all of them. However excluding broken stuff here is probably good idea. Keeping and trying to fix unused broken code, would probably be waste of time, as they can be re-added later, if needed by future backport. (I'll take a look at that)
For hotspot-specific or low-level stuff it is probably safest approach. In case of more generic classes (which are also used by Also we could use this opportunity to move whitebox classes to |
Even though, it would be good for backporting, I have so far excluded tests themselfs from move, as there are some additional difficulties with that. While changing test library location can be done more or less transparently, in case of tests there are some complications:
|
I have removed lib classes, which do not compile on jdk 8 (and ones depending on them). Retested -> OK. |
@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! |
@zzambers This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
This looks good. All seem to have been added by the JFR backport. While some are unique and only used by that (
|
I know what you mean, and it is what has put me off doing this earlier. We can see how things look once the library work is done, but I think it would actually help remove a lot of special casing for 8u long term. |
/open |
@zzambers This pull request is now open |
Seems like this PR will need to get updated (rebased), due to changes introduced by: |
@zzambers Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
I have rebased changes on current master to fix conflict as shown by GH. (Bot does not like rebasing, but I find it less evil and more readable, than merging in master.) Rebase using |
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.
Yes, I agree a rebase makes sense here. The bot comment makes sense to encourage people to respond to review comments with further commits, but not really with merges. Worst of all is with dependent pull requests, where merging the two identical change requests would be more dangerous than just rebasing and having git
just recognise and drop the duplicate. Of course, that duplicate is only created because the bot itself does a rebase...
The additional changes look fine to me. Let's get this in.
|
/approval starts process of unifying test libraries and moving them to same place as in newer jdks, it only affects tests, GH testing OK |
@zzambers usage: |
/approval request starts process of unifying test libraries and moving them to same place as in newer jdks, it only affects tests, GH testing OK |
/approve yes |
@gnu-andrew |
@zzambers This change now passes all automated pre-integration checks. 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
@gnu-andrew thank you /integrate |
I would like to start effort to unify test libraries in openjdk 8 into one unified library. This is first step of that effort, which moves newest copy of jdk test library (added with jfr backport) from
jdk/test/lib
totest/lib
. For more details please continue reading.Problem:
Test libraries in jdk8 are a bit messy.
There are currently 3 different test libraries:
com.oracle.java.testlibrary
,sun.hotspot...
), includes testlibrary tests in hotspot/test/testlibrary_testsjdk.testlibrary
,com.oracle.testlibrary.jsr292
)jdk.test.lib
sun.hotspot...
)Many test library classes exist in multiple different copies (using different pkgs). Few examples:
Few additional observations:
sun.hotspot
also seem incompatible with 8 (e.g. NMethod.java (compare to NMethod.java from hs))@library
jtreg tag is different from newer jdks (for all 3 test libraries)This situation complicates backporting and leads to confusion. (What is correct library path? What package test lib classes use? Which library to use and to which one do backports? Which part are broken and why? etc...)
See some examples: #129 #255 (comment)
Solution:
Proposed solution is to have single test library placed in
test/lib
directory (+ test library tests intest/lib-test
) by fixing/merging test libraries. (same locations are used in newer jdks)Goal is following:
@library
jtreg tag compatible with later jdks (@library /test/lib
)TEST.ROOT
files are not moved, so this should not break existing CIs.Because this is big change it should be performed in steps:
test/lib
and do necessary modifications to tests (addexternal.lib.roots
toTEST.ROOT
files, modify@library
tag of affected test)Changes in this PR:
This is just the first step and consist of:
jdk/test/lib
->test/lib
(excludingtestlibrary
,security
dirs belonging to the old jdk testlibrary)external.lib.roots
toTEST.ROOT
files of jdk and hotspot@library
, with excpetion ofTestNative.sh
)Testing:
tier1: passed (see Checks)
jdk_core: OK (no regressions to master)
jdk_jfr: OK (no regressions to master)
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/294/head:pull/294
$ git checkout pull/294
Update a local copy of the PR:
$ git checkout pull/294
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/294/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 294
View PR using the GUI difftool:
$ git pr show -t 294
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/294.diff
Webrev
Link to Webrev Comment