adjust acceptable size window for compressed unit test data
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 5 May 2017 12:27:29 +0000 (14:27 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
commitb6faf76e9522607b90a8c120393f45e8d0d56b5d
treef53abd0599e3692020a9bd519f47d4bf6324788b
parentcea130ecb9f78b76f997d5fd641d163d39e3b5c9
adjust acceptable size window for compressed unit test data

A low bound of 330 causes the test to fail with version 1.2.3 of
zlib.

Earlier this did not occur because in concat mode, tarfile would
always write an empty zlib compressed chunk right at the
beginning of the archive and then immediately create a new one as
soon as actual input arrived. For this reason, the resulting
archive size remained within the bounds chosen in
test_multivol.py. Due to the removal of the redundancy, this is
no longer the case. The problem is masked on newer versions of
zlib (tested: 1.2.8 of fc25) which create larger compressed files
in general for the same inputs.

For the “test_compress_single” unit test, the input consists of a
an archive 61440 bytes. Compress with level 9, window bits 31,
and a memlevel of 9, the output length is:

    version     size (B)
    1.2.3       308
    1.2.8       324

Add to that the file name in our custom header and the latter
passes 330 B whereas the former doesn’t.

A lower bound of 315 is justified.
testing/test_multivol.py