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

8340116: test/jdk/sun/security/tools/jarsigner/PreserveRawManifestEntryAndDigest.java can fail due to regex #21280

Closed
wants to merge 2 commits into from

Conversation

fguallini
Copy link
Member

@fguallini fguallini commented Oct 1, 2024

The test sun/security/tools/jarsigner/PreserveRawManifestEntryAndDigest.java may fail with the following exception:

test PreserveRawManifestEntryAndDigest.testNameImmediatelyContinued(): failure
java.lang.AssertionError: "s k 300 Tue Jun 25 10:20:16 GMT+07:00 2024 META-INF/MANIFEST.MF" should have matched "s k *\\d+ .{28,29} META-INF/MANIFEST[.]MF" expected [true] but found [false]

The failure occurs due to a mismatch in the expected timestamp format, this happens because jarsigner uses the system's current timezone for output timestamps when signing. The current regular expression expects a timestamp length of 28 or 29 characters, which works if the test is run from a timezone like PST or CEST. However, it fails for longer timezone formats, such as 'GMT+07:00'.

This PR updates the regular expression ensuring that the test can handle a wider range of timezone strings. Also, removed a couple of unused params from a method.


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-8340116: test/jdk/sun/security/tools/jarsigner/PreserveRawManifestEntryAndDigest.java can fail due to regex (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21280

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 1, 2024

👋 Welcome back fguallini! 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 Oct 1, 2024

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

8340116: test/jdk/sun/security/tools/jarsigner/PreserveRawManifestEntryAndDigest.java can fail due to regex

Reviewed-by: mullan

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

  • ae82cc1: 8342188: Update tests to use stronger key parameters and certificates
  • 7ad3ef7: 8343057: JFR: Sorting in 'jfr view' can violate contract
  • 7d8bd21: 8335977: Deoptimization fails with assert "object should be reallocated already"
  • b269493: 8338981: Access to private classes should be permitted inside the permits clause of the enclosing top-level class
  • 3ccd2f7: 8342458: More consistent constant instruction handling
  • 29ae265: 8341861: GHA: Use only retention mechanism to remove bundles
  • e5bbad0: 8334999: RISC-V: implement AES single block encryption/decryption intrinsics
  • c40bb76: 8343296: IGV: Show pre/main/post at CountedLoopNodes
  • dee0982: 8343132: Remove temporary transitions from Virtual thread implementation
  • 2f1ba5e: 8343307: Throw ZipException instead of IAE in ZipFile.Source::initCEN
  • ... and 426 more: https://git.openjdk.org/jdk/compare/f2a767f59b1f66966665bc8601273b532961395a...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.

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 (@seanjmullan) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk
Copy link

openjdk bot commented Oct 1, 2024

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

  • security

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.

@fguallini fguallini marked this pull request as ready for review October 1, 2024 14:33
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 1, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 1, 2024

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 29, 2024

@fguallini 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!

@fguallini
Copy link
Member Author

Hi, please I need a review for this small PR

Copy link
Member

@seanjmullan seanjmullan left a comment

Choose a reason for hiding this comment

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

LGTM.

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

LGTM.

Thanks for the review!

@fguallini
Copy link
Member Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 31, 2024
@openjdk
Copy link

openjdk bot commented Oct 31, 2024

@fguallini
Your change (at version 5a42937) is now ready to be sponsored by a Committer.

@seanjmullan
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 1, 2024

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

  • da0e9e3: 8343333: Parallel: Cleanup comment referring Solaris in MutableNUMASpace
  • f77a514: 8343194: Avoid redundant Hashtable.containsKey call in CodeSource.readObject
  • 4a70c83: 8343378: Exceptions in javax/management DeadLockTest.java do not cause test failure
  • 8d4d589: 8343297: Vector unsigned min/max test are failing with -Xcomp
  • 2a4d9d9: 8343379: [BACKOUT] 8343190 GHA: Try building JTReg several times
  • 6f6cfe6: 8343380: C2: assert(iff->in(1)->is_OpaqueNotNull()) failed: must be OpaqueNotNull
  • cbda758: 8343122: RISC-V: C2: Small improvement for real runtime callouts
  • 803612e: 8343121: RISC-V: More accurate max size for C2SafepointPollStub and C2EntryBarrierStub
  • b627a41: 8343345: Use -jvmArgsPrepend when running microbenchmarks in RunTests.gmk
  • 2932144: 8343305: Remove Indify-dependent microbenchmarks
  • ... and 441 more: https://git.openjdk.org/jdk/compare/f2a767f59b1f66966665bc8601273b532961395a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 1, 2024

@seanjmullan @fguallini Pushed as commit 7e87c07.

💡 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
integrated Pull request has been integrated security [email protected]
Development

Successfully merging this pull request may close these issues.

2 participants