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

Mimic minigzip behavior and only unlink files if not using -c. #1238

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

nmoinvaz
Copy link
Member

@nmoinvaz nmoinvaz commented Apr 8, 2022

Issue discovered in #1185:

adam@eggsbenedict ~/scratch/zlib-ng/build7 $ ~/scratch/deflatebench/deflatebench.py 
Loaded config file '/home/adam/deflatebench.conf'.
Tool: minideflate
Activated single file mode
Level 0-9: /tmp/silesia.tar  202.1 MiB   211,957,760 B
Starting run 1 of 15
Testing level 0: cdTraceback (most recent call last):
  File "/home/adam/scratch/deflatebench/deflatebench.py", line 681, in <module>
    main()
  File "/home/adam/scratch/deflatebench/deflatebench.py", line 680, in main
    benchmain()
  File "/home/adam/scratch/deflatebench/deflatebench.py", line 565, in benchmain
    compsize,comptime,decomptime,hashfail = runtest(tempfiles,level)
  File "/home/adam/scratch/deflatebench/deflatebench.py", line 341, in runtest
    os.unlink(compfile)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/zlib-testfil.gz'

@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #1238 (8482235) into develop (98d4908) will decrease coverage by 0.67%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #1238      +/-   ##
===========================================
- Coverage    88.02%   87.34%   -0.68%     
===========================================
  Files          114      114              
  Lines        10192    10143      -49     
  Branches      2550     2538      -12     
===========================================
- Hits          8971     8859     -112     
+ Misses         970      962       -8     
- Partials       251      322      +71     
Flag Coverage Δ
macos_clang 30.95% <ø> (ø)
macos_gcc 75.01% <0.00%> (-0.01%) ⬇️
ubuntu_clang 86.55% <100.00%> (-0.76%) ⬇️
ubuntu_clang_debug 86.96% <100.00%> (+0.83%) ⬆️
ubuntu_clang_inflate_allow_invalid_dist 87.11% <100.00%> (+0.08%) ⬆️
ubuntu_clang_inflate_strict 87.36% <100.00%> (+0.10%) ⬆️
ubuntu_clang_mmap 87.55% <100.00%> (+0.20%) ⬆️
ubuntu_clang_pigz 40.99% <ø> (ø)
ubuntu_clang_pigz_no_optim 41.19% <ø> (ø)
ubuntu_clang_pigz_no_threads 40.56% <ø> (ø)
ubuntu_clang_reduced_mem 87.81% <100.00%> (+0.13%) ⬆️
ubuntu_gcc 77.09% <0.00%> (+0.78%) ⬆️
ubuntu_gcc_aarch64 77.40% <0.00%> (+0.01%) ⬆️
ubuntu_gcc_aarch64_compat_no_opt 75.47% <0.00%> (-0.02%) ⬇️
ubuntu_gcc_aarch64_no_acle 76.30% <0.00%> (-0.02%) ⬇️
ubuntu_gcc_aarch64_no_neon 76.19% <0.00%> (-0.02%) ⬇️
ubuntu_gcc_armhf 77.41% <0.00%> (+0.01%) ⬆️
ubuntu_gcc_armhf_compat_no_opt 75.38% <0.00%> (-0.02%) ⬇️
ubuntu_gcc_armhf_no_acle 77.43% <0.00%> (+0.01%) ⬆️
ubuntu_gcc_armhf_no_neon 77.19% <0.00%> (+0.01%) ⬆️
ubuntu_gcc_armsf 77.28% <0.00%> (+0.01%) ⬆️
ubuntu_gcc_armsf_compat_no_opt 75.05% <0.00%> (-0.02%) ⬇️
ubuntu_gcc_benchmark 74.65% <0.00%> (-0.36%) ⬇️
ubuntu_gcc_compat_no_opt 76.61% <0.00%> (+0.01%) ⬆️
ubuntu_gcc_compat_sprefix 75.13% <0.00%> (+0.40%) ⬆️
ubuntu_gcc_m32 74.87% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_mingw_i686 0.00% <0.00%> (ø)
ubuntu_gcc_mingw_x86_64 0.00% <0.00%> (ø)
ubuntu_gcc_no_avx2 76.75% <0.00%> (-0.01%) ⬇️
ubuntu_gcc_no_ctz 74.80% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_no_ctzll 74.83% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_no_pclmulqdq 74.74% <0.00%> (-0.01%) ⬇️
ubuntu_gcc_no_sse2 76.81% <0.00%> (+0.75%) ⬆️
ubuntu_gcc_no_sse4 76.34% <0.00%> (-0.01%) ⬇️
ubuntu_gcc_o1 76.06% <0.00%> (-0.01%) ⬇️
ubuntu_gcc_osb ∅ <ø> (∅)
ubuntu_gcc_pigz 38.89% <ø> (-0.06%) ⬇️
ubuntu_gcc_pigz_aarch64 39.34% <ø> (-0.03%) ⬇️
ubuntu_gcc_ppc 73.84% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_ppc64 74.59% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_ppc64le 74.57% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_ppc_no_power8 74.77% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_s390x 74.76% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_s390x_dfltcc 72.08% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_s390x_dfltcc_compat 73.68% <0.00%> (+<0.01%) ⬆️
ubuntu_gcc_s390x_no_crc32 74.52% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_sparc64 74.65% <0.00%> (+0.02%) ⬆️
ubuntu_gcc_sprefix 74.92% <0.00%> (+0.39%) ⬆️
win64_gcc ?
win64_gcc_compat_no_opt ?

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

Impacted Files Coverage Δ
test/minideflate.c 58.57% <100.00%> (+0.77%) ⬆️
zutil_p.h 77.77% <0.00%> (-22.23%) ⬇️
test/fuzz/fuzzer_minigzip.c 50.38% <0.00%> (-20.32%) ⬇️
test/fuzz/fuzzer_example_dict.c 70.66% <0.00%> (-19.46%) ⬇️
test/fuzz/fuzzer_example_small.c 76.66% <0.00%> (-17.09%) ⬇️
test/fuzz/fuzzer_example_large.c 75.00% <0.00%> (-15.67%) ⬇️
test/fuzz/fuzzer_example_flush.c 79.36% <0.00%> (-13.06%) ⬇️
test/test_compare256.cc 60.00% <0.00%> (-4.00%) ⬇️
gzlib.c 70.77% <0.00%> (-0.33%) ⬇️
test/fuzz/fuzzer_compress.c 97.50% <0.00%> (-0.18%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98d4908...8482235. Read the comment docs.

@Dead2 Dead2 merged commit cd65646 into zlib-ng:develop Apr 8, 2022
@Dead2 Dead2 mentioned this pull request Dec 27, 2022
Dead2 added a commit that referenced this pull request Mar 7, 2023
Changes since 2.0.6:
- Fix CVE-2022-37434 #1328
- Fix chunkmemset #1196
- Fix deflateBound too small #1236
- Fix Z_SOLO #1263
- Fix ACLE variant of crc32 #1274
- Fix inflateBack #1311
- Fix deflate_quick windowsize #1431
- Fix DFLTCC bugs related to adler32 #1349 and #1390
- Fix warnings #1194 #1312 #1362
- MacOS build fix #1198
- Add invalid windowBits handling #1293
- Support for Force TZCNT #1186
- Support for aligned_alloc() #1360
- Minideflate improvements #1175 #1238
- Dont use unaligned access for memcpy #1309
- Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365
- Test improvements #1208 #1227 #1241 #1353
- Cleanup #1266
- Documentation #1205 #1359
- Misc improvements #1294 #1297 #1306 #1344 #1348
- Backported zlib fixes
- Backported CI workflows from Develop branch
Dead2 added a commit that referenced this pull request Mar 17, 2023
Changes since 2.0.6:
- Fix CVE-2022-37434 #1328
- Fix chunkmemset #1196
- Fix deflateBound too small #1236
- Fix Z_SOLO #1263
- Fix ACLE variant of crc32 #1274
- Fix inflateBack #1311
- Fix deflate_quick windowsize #1431
- Fix DFLTCC bugs related to adler32 #1349 and #1390
- Fix warnings #1194 #1312 #1362
- MacOS build fix #1198
- Add invalid windowBits handling #1293
- Support for Force TZCNT #1186
- Support for aligned_alloc() #1360
- Minideflate improvements #1175 #1238
- Dont use unaligned access for memcpy #1309
- Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365
- Test improvements #1208 #1227 #1241 #1353
- Cleanup #1266
- Documentation #1205 #1359
- Misc improvements #1294 #1297 #1306 #1344 #1348
- Backported zlib fixes
- Backported CI workflows from Develop branch
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

2 participants