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

8283756: (zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes #7984

Conversation

simonis
Copy link
Member

@simonis simonis commented Mar 28, 2022

The test ZipFSOutputStreamTest deflates content into a zip file system and subsequently inflates the deflated files and checks their content against the original data.

The content consists of a data stream of bytes with the value 42.

The check currently compares the temporary inflation buffer with the original source buffer, no matter how many bytes were inflated into the inflation buffer. This can lead to problems with alternative zlib implementations which sometimes write beyond the last inflated byte (see JDK-8282648 for more details).

The fix is trivial. Only compare as many bytes as have been inflated against the original content.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8283756: (zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7984/head:pull/7984
$ git checkout pull/7984

Update a local copy of the PR:
$ git checkout pull/7984
$ git pull https://git.openjdk.java.net/jdk pull/7984/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7984

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7984.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 28, 2022

👋 Welcome back simonis! 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 openjdk bot added the rfr label Mar 28, 2022
@openjdk
Copy link

openjdk bot commented Mar 28, 2022

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

  • nio

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 nio label Mar 28, 2022
@mlbridge
Copy link

mlbridge bot commented Mar 28, 2022

Webrevs

@jaikiran
Copy link
Member

jaikiran commented Mar 28, 2022

Thank you for catching this, Volker. The change looks fine to me.

Copy link
Contributor

@AlanBateman AlanBateman left a comment

This looks okay.

@simonis simonis force-pushed the JDK-8283756-ZipFSOutputStreamTest-testbug branch from 6f121a2 to 810369c Compare Mar 28, 2022
@simonis simonis force-pushed the JDK-8283756-ZipFSOutputStreamTest-testbug branch from 810369c to 814a2f5 Compare Mar 28, 2022
@simonis simonis changed the title 8283756: [testbug] Only verify inflated bytes in ZipFSOutputStreamTest 8283756: (zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes Mar 28, 2022
@openjdk
Copy link

openjdk bot commented Mar 28, 2022

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

8283756: (zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes

Reviewed-by: jpai, alanb, 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 3 new commits pushed to the master branch:

  • f4eaa16: 8283728: jdk.hotspot.agent: Wrong location for RISCV64ThreadContext.java
  • cdef087: 8283727: P11KeyGenerator has import statement with two semicolons after JDK-8267319
  • 7f12537: 8283558: Parallel: Pass PSIsAliveClosure to ReferenceProcessor constructor

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 added the ready label Mar 28, 2022
@simonis
Copy link
Member Author

simonis commented Mar 28, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Mar 28, 2022

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

  • d6fa8b0: 8283469: Don't use memset to initialize members in FileMapInfo and fix memory leak
  • 8567266: 8283683: Make ThreadLocalRandom a final class
  • f4eaa16: 8283728: jdk.hotspot.agent: Wrong location for RISCV64ThreadContext.java
  • cdef087: 8283727: P11KeyGenerator has import statement with two semicolons after JDK-8267319
  • 7f12537: 8283558: Parallel: Pass PSIsAliveClosure to ReferenceProcessor constructor

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Mar 28, 2022
@openjdk openjdk bot closed this Mar 28, 2022
@openjdk openjdk bot removed ready rfr labels Mar 28, 2022
@openjdk
Copy link

openjdk bot commented Mar 28, 2022

@simonis Pushed as commit 0c472c8.

💡 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 nio
4 participants