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

Added unit test for inflate with Z_FINISH and no window. #1603

Merged
merged 1 commit into from Nov 23, 2023

Conversation

nmoinvaz
Copy link
Member

This test decompresses a small git pack object with the text: "alone in the dark". By providing inflate with Z_FINISH, it should not use a sliding window according to zlib docs. We purposefully limit the read buffer size to trigger CHECK mode to bail early.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (6592acc) 83.91% compared to head (f895b87) 69.88%.

Files Patch % Lines
test/minideflate.c 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1603       +/-   ##
============================================
- Coverage    83.91%   69.88%   -14.04%     
============================================
  Files          133      116       -17     
  Lines        10874     9479     -1395     
  Branches      2807     2341      -466     
============================================
- Hits          9125     6624     -2501     
- Misses        1050     1778      +728     
- Partials       699     1077      +378     
Flag Coverage Δ
macos_clang ?
macos_gcc ?
ubuntu_clang ?
ubuntu_clang_debug ?
ubuntu_clang_inflate_allow_invalid_dist ?
ubuntu_clang_inflate_strict ?
ubuntu_clang_mmap ?
ubuntu_clang_pigz 13.93% <ø> (ø)
ubuntu_clang_pigz_no_optim 11.52% <ø> (ø)
ubuntu_clang_pigz_no_threads 13.74% <ø> (-0.06%) ⬇️
ubuntu_clang_reduced_mem ?
ubuntu_clang_toolchain_riscv ?
ubuntu_gcc ?
ubuntu_gcc_aarch64 ?
ubuntu_gcc_aarch64_compat_no_opt ?
ubuntu_gcc_aarch64_no_acle ?
ubuntu_gcc_aarch64_no_neon ?
ubuntu_gcc_armhf ?
ubuntu_gcc_armhf_compat_no_opt ?
ubuntu_gcc_armhf_no_acle ?
ubuntu_gcc_armhf_no_neon ?
ubuntu_gcc_armsf ?
ubuntu_gcc_armsf_compat_no_opt ?
ubuntu_gcc_benchmark ?
ubuntu_gcc_compat_no_opt ?
ubuntu_gcc_compat_sprefix ?
ubuntu_gcc_m32 ?
ubuntu_gcc_mingw_i686 ?
ubuntu_gcc_mingw_x86_64 ?
ubuntu_gcc_mips ?
ubuntu_gcc_mips64 ?
ubuntu_gcc_no_avx2 ?
ubuntu_gcc_no_ctz ?
ubuntu_gcc_no_ctzll ?
ubuntu_gcc_no_pclmulqdq ?
ubuntu_gcc_no_sse2 ?
ubuntu_gcc_no_sse42 ?
ubuntu_gcc_o1 ?
ubuntu_gcc_osb ?
ubuntu_gcc_pigz 38.07% <ø> (-0.11%) ⬇️
ubuntu_gcc_pigz_aarch64 39.16% <ø> (-0.03%) ⬇️
ubuntu_gcc_ppc ?
ubuntu_gcc_ppc64 ?
ubuntu_gcc_ppc64_power9 ?
ubuntu_gcc_ppc64le ?
ubuntu_gcc_ppc64le_novsx ?
ubuntu_gcc_ppc64le_power9 ?
ubuntu_gcc_ppc_no_power8 ?
ubuntu_gcc_s390x ?
ubuntu_gcc_s390x_dfltcc 71.94% <0.00%> (+0.03%) ⬆️
ubuntu_gcc_s390x_dfltcc_compat 74.00% <0.00%> (+0.01%) ⬆️
ubuntu_gcc_s390x_no_crc32 ?
ubuntu_gcc_sparc64 ?
ubuntu_gcc_sprefix ?
win64_gcc ?
win64_gcc_compat_no_opt ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nmoinvaz
Copy link
Member Author

This PR should fail and PR #1602 should fix it.

Copy link
Member

@Dead2 Dead2 left a comment

Choose a reason for hiding this comment

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

LGTM

@mtl1979
Copy link
Collaborator

mtl1979 commented Nov 22, 2023

Looks like harakiri code, but for the purpose of simplifying the libgit2 failure, this does require no external code. I'm not sure it is good idea to separate these as two PRs due to chicken and egg dilemma.

@nmoinvaz
Copy link
Member Author

The other PR can be rebased after this is merged.

This test decompresses a small git pack object with the text:
"alone in the dark". By providing inflate with Z_FINISH, it should not use a
sliding window according to zlib docs. We purposefully limit the read buffer
size to trigger CHECK mode to bail early.
@Dead2 Dead2 merged commit 0b3bb1d into zlib-ng:develop Nov 23, 2023
66 of 135 checks passed
@Dead2 Dead2 mentioned this pull request Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants