Skip Menu |

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 120134
Status: resolved
Priority: 0/
Queue: IO-Compress

People
Owner: Nobody in particular
Requestors: jplesnik [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Tests broken with zlib-1.2.11
The rebuild IO-Compress fails against system zlib-1.2.11. The full log can find https://koji.fedoraproject.org/koji/taskinfo?taskID=17627065 Example of error: # Failed test (t/cz-06gzsetp.t at line 48) # got: '1.2.11' # expected: '1.2.8' # Failed test (t/cz-06gzsetp.t at line 75) # got: -1 # expected: 0 # Failed test (t/cz-06gzsetp.t at line 90) # got: '74154' # expected: '-1' # Failed test (t/cz-06gzsetp.t at line 92) # Failed test (t/cz-06gzsetp.t at line 93) # Failed test (t/cz-06gzsetp.t at line 125) # Failed test (t/cz-06gzsetp.t at line 137) # got: '-1' # expected: '74154' # Inflation Error: data error # Failed test (t/cz-06gzsetp.t at line 140) # unc len = , input len = 74154 # Failed test (t/cz-06gzsetp.t at line 143) # Failed test (t/cz-06gzsetp.t at line 125) # Failed test (t/cz-06gzsetp.t at line 137) # got: '-1' # expected: '74154' # Inflation Error: data error # Failed test (t/cz-06gzsetp.t at line 140) # unc len = , input len = 74154 # Failed test (t/cz-06gzsetp.t at line 143) # Failed test (t/cz-06gzsetp.t at line 125) # Failed test (t/cz-06gzsetp.t at line 137) # got: '247' # expected: '74154' # Inflation Error: data error # Failed test (t/cz-06gzsetp.t at line 140) # unc len = 247, input len = 74154 # Failed test (/usr/share/perl5/vendor_perl/Test/NoWarnings.pm at line 45) # There were 5 warning(s) # Previous test 11 '' # Use of uninitialized value $uncompressed in string eq at t/cz-06gzsetp.t line 92. # at t/cz-06gzsetp.t line 92. # # ---------- # Previous test 23 '' # Use of uninitialized value $uncompressed in string eq at t/cz-06gzsetp.t line 140. # at t/cz-06gzsetp.t line 140. # # ---------- # Previous test 24 'got expected uncompressed data' # Use of uninitialized value $uncompressed in concatenation (.) or string at t/cz-06gzsetp.t line 140. # at t/cz-06gzsetp.t line 140. # # ---------- # Previous test 35 '' # Use of uninitialized value $uncompressed in string eq at t/cz-06gzsetp.t line 140. # at t/cz-06gzsetp.t line 140. # # ---------- # Previous test 36 'got expected uncompressed data' # Use of uninitialized value $uncompressed in concatenation (.) or string at t/cz-06gzsetp.t line 140. # at t/cz-06gzsetp.t line 140. # # Looks like you failed 17 tests of 52. t/cz-06gzsetp.t .................
There are two problems First, this line # The version of zlib.h does not match the version of libz # # You have zlib.h version 1.2.8 # and libz version 1.2.11 is saying that Compress::Raw::Zlib was built with zlib 1.2.8, but you are trying to use it with zlib 1.2.11. The versions must match. Next issue is support for the latest zlib in Compress::Raw::Zlib. The zlib API has changed since 1.28 and the the fix to support it is still ongoing. The fix is being tracked by ticket #119762
From: ppisar [...] redhat.com
Dne Út 07.úno.2017 09:53:17, PMQS napsal(a): Show quoted text
> Next issue is support for the latest zlib in Compress::Raw::Zlib. The > zlib API has changed since 1.28 and the the fix to support it is still > ongoing. > > The fix is being tracked by ticket #119762
If the Compress::Raw::Zlib does not come with a fix, one can adjust the IO-Compress tests as shown in the attached fix. But I agree it looks ugly and Compress::Raw::Zlib should come with some compatibility level that will not need to change it's users.
Subject: 0001-Adapt-tests-to-zlib-1.2.11.patch
From a30130055928e5979c35aceee75cc3becfe3ad22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Tue, 7 Feb 2017 17:23:29 +0100 Subject: [PATCH] Adapt tests to zlib 1.2.11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CPAN RT#120134 Signed-off-by: Petr Písař <ppisar@redhat.com> --- t/cz-03zlib-v1.t | 13 +++++++++++-- t/cz-06gzsetp.t | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/t/cz-03zlib-v1.t b/t/cz-03zlib-v1.t index a85ed10..e070d46 100755 --- a/t/cz-03zlib-v1.t +++ b/t/cz-03zlib-v1.t @@ -23,10 +23,10 @@ BEGIN my $count = 0 ; if ($] < 5.005) { - $count = 453 ; + $count = 456 ; } else { - $count = 471 ; + $count = 474 ; } @@ -721,6 +721,9 @@ EOM ($Answer, $status) = $x->deflate($hello) ; ok $status == Z_OK ; + ($X, $status) = $x->flush(Z_BLOCK) ; + ok $status == Z_OK ; + $Answer .= $X ; $input .= $hello; # error cases @@ -747,6 +750,9 @@ EOM ($X, $status) = $x->deflate($goodbye) ; ok $status == Z_OK ; $Answer .= $X ; + ($X, $status) = $x->flush(Z_BLOCK) ; + ok $status == Z_OK ; + $Answer .= $X ; $input .= $goodbye; # change only Level @@ -759,6 +765,9 @@ EOM ($X, $status) = $x->deflate($goodbye) ; ok $status == Z_OK ; $Answer .= $X ; + ($X, $status) = $x->flush(Z_BLOCK) ; + ok $status == Z_OK ; + $Answer .= $X ; $input .= $goodbye; # change only Strategy diff --git a/t/cz-06gzsetp.t b/t/cz-06gzsetp.t index b2cc687..45869a0 100644 --- a/t/cz-06gzsetp.t +++ b/t/cz-06gzsetp.t @@ -39,7 +39,7 @@ my $ver = Compress::Zlib::zlib_version(); plan skip_all => "gzsetparams needs zlib 1.0.6 or better. You have $ver\n" if ZLIB_VERNUM() < 0x1060 ; -plan tests => 51 + $extra ; +plan tests => 55 + $extra ; # Check zlib_version and ZLIB_VERSION are the same. SKIP: { @@ -65,6 +65,7 @@ SKIP: { $input .= $hello; is $x->gzwrite($hello), $len_hello, "gzwrite returned $len_hello" ; + cmp_ok $x->gzflush(Z_BLOCK), '==', Z_OK, "flush before gzsetparams is ok"; # Error cases eval { $x->gzsetparams() }; @@ -120,6 +121,7 @@ foreach my $CompressClass ('IO::Compress::Gzip', my $input .= $hello; is $x->write($hello), $len_hello, "wrote $len_hello bytes" ; + ok $x->flush(Z_BLOCK), "flush before deflateParams is ok"; # Change both Level & Strategy ok $x->deflateParams(Z_BEST_SPEED, Z_HUFFMAN_ONLY), "deflateParams ok"; -- 2.7.4
This on will be addressed by the fix to Compress-Raw-Zlib for #119762. Closing this ticket out.