Skip to content
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

7022325: TEST_BUG: test/java/util/zip/ZipFile/ReadLongZipFileName.java leaks files if it fails #19492

Closed
wants to merge 2 commits into from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented May 31, 2024

Can I please get a review of this test-only change which updates a couple of places in the test to use try-with-resource?

As noted in https://bugs.openjdk.org/browse/JDK-7022325 this change should prevent leaking of resources in case there's any failure in the test. The test continues to pass with this change.


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-7022325: TEST_BUG: test/java/util/zip/ZipFile/ReadLongZipFileName.java leaks files if it fails (Bug - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19492

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 31, 2024

👋 Welcome back jpai! 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 May 31, 2024

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

7022325: TEST_BUG: test/java/util/zip/ZipFile/ReadLongZipFileName.java leaks files if it fails

Reviewed-by: lancea

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

  • 2453002: 8331977: Crash: SIGSEGV in dlerror()
  • 51b2f80: 8332923: ObjectMonitorUsage.java failed with unexpected waiter_count
  • d29d5bf: 8333290: NMT report should not print Metaspace info if Metaspace is not yet initialized
  • c0ce7d8: 8333046: Clean codes in sun.security.util.math
  • 10eb1cb: 8331879: Clean up non-standard use of /// comments in java.base
  • 2cae9a0: 8314480: Memory ordering spec updates in java.lang.ref
  • 9fd0e73: 8332110: [macos] jpackage tries to sign added files without the --mac-sign option
  • 8aeada1: 8331159: VM build without C2 fails after JDK-8180450
  • e99f6a6: 8333236: Test java/foreign/TestAccessModes.java is timing out after passing
  • e650bdf: 8332507: compilation result depends on compilation order
  • ... and 21 more: https://git.openjdk.org/jdk/compare/3634a9105053717f3099982390ce2b9e564f0ac5...master

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 rfr Pull request is ready for review label May 31, 2024
@openjdk
Copy link

openjdk bot commented May 31, 2024

@jaikiran 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 May 31, 2024
@mlbridge
Copy link

mlbridge bot commented May 31, 2024

Webrevs

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

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

Hi Jai,

I think the change is fine. I might suggest that we take the opportunity to convert this test to use junit as part of this PR

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 31, 2024
@jaikiran
Copy link
Member Author

jaikiran commented Jun 1, 2024

Hello Lance, I have now updated the PR to convert this test to junit test. While at it, I have also cleaned up the code to use java.nio.file.Path and use the jtreg scratch directory for the directories and the jar file this test creates. That way, we don't have to manually delete the directories when done. I have verified that the changes don't change the semantics of what was being tested in this test, which was a regression test for https://bugs.openjdk.org/browse/JDK-6374379.

The test continues to pass with these change in our CI against all platforms.

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

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

thank you Jai, changes look good

@jaikiran
Copy link
Member Author

jaikiran commented Jun 2, 2024

Thank you Lance for the review.

@jaikiran
Copy link
Member Author

jaikiran commented Jun 2, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Jun 2, 2024

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

  • 2453002: 8331977: Crash: SIGSEGV in dlerror()
  • 51b2f80: 8332923: ObjectMonitorUsage.java failed with unexpected waiter_count
  • d29d5bf: 8333290: NMT report should not print Metaspace info if Metaspace is not yet initialized
  • c0ce7d8: 8333046: Clean codes in sun.security.util.math
  • 10eb1cb: 8331879: Clean up non-standard use of /// comments in java.base
  • 2cae9a0: 8314480: Memory ordering spec updates in java.lang.ref
  • 9fd0e73: 8332110: [macos] jpackage tries to sign added files without the --mac-sign option
  • 8aeada1: 8331159: VM build without C2 fails after JDK-8180450
  • e99f6a6: 8333236: Test java/foreign/TestAccessModes.java is timing out after passing
  • e650bdf: 8332507: compilation result depends on compilation order
  • ... and 21 more: https://git.openjdk.org/jdk/compare/3634a9105053717f3099982390ce2b9e564f0ac5...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 2, 2024

@jaikiran Pushed as commit 4785461.

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

@jaikiran jaikiran deleted the 7022325 branch June 2, 2024 01:08
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.

2 participants