Skip to content

Conversation

@alexeysemenyukoracle
Copy link
Member

@alexeysemenyukoracle alexeysemenyukoracle commented Mar 28, 2025

Make tools/jpackage/share/ErrorTest.java test safely handle the case when native bundling is unavailable on the test host.

Additionally:

  • If native bundling is unavailable on the test host, PackageTest will throw jtreg.SkippedException and mark the test as skipped instead of silently doing nothing. This should mark a few jpackage tests "skipped" in tests runs on Alpine Linux that doesn't support either .deb or .rpm packaging.
  • Get rid of the dependency on jtreg.SkippedException from /jdk/test lib as this exception can be thrown from almost every jpackage test because of the changes in PackageTest. Instead embed jtreg.SkippedException classfile in TKit.java source and load it from there. This is a less intrusive alternative to adding
 * @library /test/lib
 * @build jtreg.SkippedException

in every jtreg test declaration


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8352419: Test tools/jpackage/share/ErrorTest.java#id0 and #id1 fail (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24294/head:pull/24294
$ git checkout pull/24294

Update a local copy of the PR:
$ git checkout pull/24294
$ git pull https://git.openjdk.org/jdk.git pull/24294/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24294

View PR using the GUI difftool:
$ git pr show -t 24294

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24294.diff

Using Webrev

Link to Webrev Comment

…Stable order of platform package types. Make PackageTest fail if native packagers are unavailable.
@bridgekeeper
Copy link

bridgekeeper bot commented Mar 28, 2025

👋 Welcome back asemenyuk! 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
Copy link

openjdk bot commented Mar 28, 2025

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

8352419: Test  tools/jpackage/share/ErrorTest.java#id0 and #id1 fail

Reviewed-by: almatvee

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:

  • 6970cf6: 8352775: JVM crashes with -XX:AOTMode=create -XX:+UseZGC
  • afcad8c: 5043343: FileImageInputStream and FileImageOutputStream do not properly track streamPos for RandomAccessFile
  • 6891490: 8353324: Clean up of comments and import after 8319192
  • 07fd666: 8342984: Bump minimum boot jdk to JDK 24

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 changed the title 8352419: Test tools/jpackage/share/ErrorTest.java#id0 and #id1 fail 8352419: Test tools/jpackage/share/ErrorTest.java#id0 and #id1 fail Mar 28, 2025
@openjdk
Copy link

openjdk bot commented Mar 28, 2025

@alexeysemenyukoracle The following label will be automatically applied to this pull request:

  • core-libs

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.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Mar 28, 2025
@alexeysemenyukoracle alexeysemenyukoracle marked this pull request as ready for review March 31, 2025 13:48
@alexeysemenyukoracle
Copy link
Member Author

@sashamatveev PTAL

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 31, 2025
@alexeysemenyukoracle
Copy link
Member Author

@MBaesken, please try this patch out.

@mlbridge
Copy link

mlbridge bot commented Mar 31, 2025

Webrevs

Copy link
Member

@sashamatveev sashamatveev left a comment

Choose a reason for hiding this comment

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

Looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 31, 2025
@ArnoZeller
Copy link
Contributor

ArnoZeller commented Apr 1, 2025

I see a test failure in tools/jpackage/helpers-test/jdk/jpackage/test/PackageTestTest.java with this PR when I run the test on Alpine without rpm or dpkg installed.

The output contains 82 Skipped Exceptions like :
jtreg.SkippedException: None of the native packagers supported in this environment
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
...
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

And in the end it fails with:
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
FAILED jdk.jpackage.test.PackageTestTest::runJPackageTests 'runJPackageTests(Path)' [1593ms]
JavaTest Message: JUnit Platform Failure(s): 1

[ JUnit Containers: found 4, started 4, succeeded 4, failed 0, aborted 0, skipped 0]
[ JUnit Tests: found 1, started 1, succeeded 0, failed 1, aborted 0, skipped 0]

java.lang.Exception: JUnit test failure
at com.sun.javatest.regtest.agent.JUnitRunner.runWithJUnitPlatform(JUnitRunner.java:169)
at com.sun.javatest.regtest.agent.JUnitRunner.main(JUnitRunner.java:102)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
at java.base/java.lang.Thread.run(Thread.java:1447)

JavaTest Message: Test threw exception: java.lang.Exception
JavaTest Message: shutting down test

@ArnoZeller
Copy link
Contributor

The same issue can be seen on a Windows system without WIX installed.

@alexeysemenyukoracle
Copy link
Member Author

Good catch. I'll work on the fix

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Apr 1, 2025
@alexeysemenyukoracle
Copy link
Member Author

@ArnoZeller, I've fixed the issue with PackageTestTest.java and verified that all jpackage tests pass on Windows without installed WiX. Please try again.

Copy link
Member

@sashamatveev sashamatveev left a comment

Choose a reason for hiding this comment

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

Latest commit looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 1, 2025
@ArnoZeller
Copy link
Contributor

Test on Windows without WIX was successful - thanks for improving this!

@alexeysemenyukoracle
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 3, 2025

Going to push as commit 70e3250.
Since your change was applied there have been 37 commits pushed to the master branch:

  • 296d9d6: 8353345: C2 asserts because maskShiftAmount modifies node without deleting the hash
  • 3ceabf0: 8353359: C2: Or(I|L)Node::Ideal is missing AddNode::Ideal call
  • b263292: 8353484: JFR: Simplify EventConfiguration
  • ffca4f2: 8353264: ZGC: Windows heap unreserving is broken
  • f7a94fe: 8352585: Add special case handling for Float16.max/min x86 backend
  • 9c5ed23: 8349988: Change cgroup version detection logic to not depend on /proc/cgroups
  • 00a038e: 8353341: C2: removal of a Mod[DF]Node crashes when the node is already dead
  • bd74922: 8338675: javac shouldn't silently change .jar files on the classpath
  • 8d3d1d4: 8353058: [PPC64] Some IR framework tests are failing after JDK-8352595
  • b01026a: 8353325: Rewrite appcds/methodHandles test cases to use CDSAppTester
  • ... and 27 more: https://git.openjdk.org/jdk/compare/6a46d554c7434fd10aade2d2b17d0ad4cad83979...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 3, 2025
@openjdk openjdk bot closed this Apr 3, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 3, 2025
@openjdk
Copy link

openjdk bot commented Apr 3, 2025

@alexeysemenyukoracle Pushed as commit 70e3250.

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

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 integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants