JDK-8185896 : Add test for ZIP64
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 10
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2017-08-07
  • Updated: 2024-09-04
Related Reports
Relates :  
Description
According with Code Coverage report, codes for ZIP64 has low coverage. Some code path look like never attempted. It is necessary to double check add test if needed.
Comments
Under test/jdk/java/util/zip/ZipFile directory of the JDK repo we have coverage for ZIP64 files. Of course, they don't cover every ZIP64 use case. The test being proposed in https://github.com/openjdk/jdk/pull/19678 addresses ZIP64 files that are used in "-Xbootclasspath/a" classpath. I don't think we have any tests for that part, so adding new tests through that PR is a good thing.
04-09-2024

Commenting on behalf of Thomas Fitzsimmons (see https://github.com/openjdk/jdk/pull/19678) "I have added to #19678 two ZIP64 test cases: one for ZIP64 extensions added implicitly due to one of the CEN fields being too large to represent, and one for ZIP64 extensions that have been added explicitly even though no CEN field required them. It is not complete coverage -- the "implicit" test only tests the field for the total number of entries. But the coverage they provide may be enough to warrant closing JDK-8185896. The test cases are fast and portable back to OpenJDK 8, and do not require significant disk space, so they can be run unconditionally as part of the default jtreg test set."
04-09-2024

we have another one jdk/test/java/util/zip/LargeZip.java
18-08-2017

This line in LargeZipFile: static long fileSize = 3L * 1024L * 1024L * 1024L; // 3GB suggests that only 2GB < size < 4GB is being tested here. OTOH LargeZip.java does appear to test files larger than 4GB. We still don't seem to have any standard way to optionally enable expensive tests. For jsr166, we have -Djsr166.expensiveTests=true Everyone maintaining a zip implementation with ZIP64 support has a testing problem.
18-08-2017

jdk/test/java/util/zip/ZipFile/LargeZipFile should provide (at least some, if not complete) the coverage for ZIP64 functionality. But due to its size, the test is not "turned on" for auto testing.
07-08-2017