openzim / libzim

Reference implementation of the ZIM specification
https://download.openzim.org/release/libzim/
GNU General Public License v2.0
163 stars 47 forks source link

Be able to open zim archive from several fds. #860

Closed mgautierfr closed 5 months ago

mgautierfr commented 5 months ago

Fix https://github.com/openzim/libzim/issues/841

The tests in this PR need a update of zim-testing-suite (https://github.com/openzim/zim-testing-suite/pull/7)

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 56.25000% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 57.77%. Comparing base (121e3af) to head (57fa6f1).

Files Patch % Lines
src/file_reader.cpp 40.00% 4 Missing and 5 partials :warning:
src/file_compound.cpp 55.55% 0 Missing and 4 partials :warning:
src/fileimpl.cpp 62.50% 0 Missing and 3 partials :warning:
src/archive.cpp 60.00% 0 Missing and 2 partials :warning:
src/file_part.h 66.66% 0 Missing and 2 partials :warning:
src/item.cpp 66.66% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #860 +/- ## ========================================== + Coverage 57.63% 57.77% +0.14% ========================================== Files 99 100 +1 Lines 4596 4616 +20 Branches 1926 1935 +9 ========================================== + Hits 2649 2667 +18 + Misses 675 669 -6 - Partials 1272 1280 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mgautierfr commented 5 months ago

Ready for a (final) review. Missing coverage is about error handling code, which is difficult to test as we need to generate io errors.

mgautierfr commented 5 months ago

Two suggested improvements have been followed. Directly rebased/fixup. Will merged once CI is ok.