8378802: [21u] backport changes to TKit.java by JDK-8352419#2633
8378802: [21u] backport changes to TKit.java by JDK-8352419#2633mmm-choi wants to merge 2 commits intoopenjdk:masterfrom
Conversation
Backport only the TKit.java change from JDK-8352419 that embeds a Base64-encoded jtreg.SkippedException class, eliminating the need for @library /test/lib and @build jtreg.SkippedException in tests. This is a minimal backport - the other changes in 8352419 (PackageType.java, PackageTest.java, ErrorTest.java) are not included as they depend on JDK-8351372 refactoring that is not present in JDK 21.
|
👋 Welcome back mmm-choi! A progress list of the required criteria for merging this PR into |
|
@mmm-choi 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 28 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 (@phohensee) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
This backport pull request has now been updated with issue from the original commit. |
|
/issue add 8375080 |
|
@mmm-choi |
|
|
|
/approval request This backport is a partial cherry-pick of JDK-8352419, taking only the self-contained This fixes JDK-8375080 jpackage tests that call The remaining changes in the upstream commit ( Tested by running |
|
/issue add 8378802 |
|
@mmm-choi This issue is referenced in the PR title - it will now be updated. |
|
Hi, I was not aware that there was already a bug open for this. If you want to backport to 17, you should make that PR use "backport <hash of push to 21>", maybe you can even use the /backport command in the push to 21. Best regards, Goetz. |
|
Also, the approval request in JDK-8378802 is missing. |
|
/approval JDK-8378802 request This fixes JDK-8375080 jpackage tests that call TKit.throwSkippedException() which currently fail with ClassNotFoundException because they don't declare @library /test/lib and @build jtreg.SkippedException. The hardcoded bytecode approach (already in tip) eliminates this dependency entirely. The remaining changes in the upstream commit (PackageType.java, PackageTest.java, ErrorTest.java) depend on JDK-8351372, a large test infrastructure refactoring (~700 lines) that is unnecessary for 21/17. Only the TKit.java change is needed to fix the skip behavior. Tested by running tools/jpackage tests and a standalone test confirming TKit.throwSkippedException() correctly produces Passed.Skipped status without test/lib on the classpath. |
|
/integrate |
|
/sponsor |
|
Going to push as commit 3931807.
Your commit was automatically rebased without conflicts. |
|
@phohensee @mmm-choi Pushed as commit 3931807. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
In order to fix #2606, consensus was reached to pull the SkippedException hardcode change from tip to fix.
The other parts of the backport require additional backports that are not trivial.
The upstream commit JDK-8352419 openjdk/jdk@70e3250 contains changes to 4 files:
TKit.java- Embedsjtreg.SkippedExceptionbytecode (included in this backport)PackageType.java- Adds new methods used by refactored ErrorTestPackageTest.java- Adds filtering logic for new ErrorTest infrastructureErrorTest.java- Uses newPackageTypeSpecrecord and test infrastructureOnly the
TKit.javachange is self-contained. The other changes depend on JDK-8351372 openjdk/jdk@3aa6d62 ("Improve negative tests coverage of jpackage"), which is a big refactoring that completely rewroteErrorTest.java(~700 lines changed).Required Prerequisites for Full Backport
ErrorTest.javarewrite (581 insertions, 78 deletions)PackageType.java)These backports are unnecessary for JDK 21 - they are test infrastructure improvements for jdk-tip that don't exist in 21.
This PR backports only the
JtregSkippedExceptionClassinner class fromTKit.java, which embeds thejtreg.SkippedExceptionbytecode via Base64 and dynamically defines the class at runtime. This eliminates the need for@library /test/liband@build jtreg.SkippedExceptionin jpackage tests and fixes all jpackage tests that call SkippedException through reflection.Tested all tools/jpackage tests and also ran a simple test and it skips correctly now.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2633/head:pull/2633$ git checkout pull/2633Update a local copy of the PR:
$ git checkout pull/2633$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2633/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2633View PR using the GUI difftool:
$ git pr show -t 2633Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2633.diff
Using Webrev
Link to Webrev Comment