Open zsan opened 5 years ago
Thanks for reporting. Currently working on issue #67 that should cover all these failures of unzip -t
on exotic zip files.
Issue also reported in RT #130773: t/26_bzip2.t fails on macOS
Hi there, I also got this issue with OpenBSD 6.6:
bash-5.0$ prove -l -v -m t/26_bzip2.t
t/26_bzip2.t ..
1..1
not ok 1 - testZip ok after t/data/bzip.zip to /tmp/testout-fc6di.zip
# Failed test 'testZip ok after t/data/bzip.zip to /tmp/testout-fc6di.zip'
# at t/26_bzip2.t line 33.
# got: '20736'
# expected: '0'
ziptest said: Archive: /tmp/testout-fc6di.zip
skipping: README need PK compat. v4.6 (can do v4.5)
Caution: zero files tested in /tmp/testout-fc6di.zip.
1 file skipped because of unsupported compression or encoding.
# Looks like you failed 1 test of 1.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
Test Summary Report
-------------------
t/26_bzip2.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=1, Tests=1, 0 wallclock secs ( 0.05 usr 0.02 sys + 0.17 cusr 0.17 csys = 0.41 CPU)
Result: FAIL
Here are more details that might help:
bash-5.0$ uname -a
OpenBSD openbsd6.6 6.6 GENERIC.MP#372 amd64
bash-5.0$ perl -V
Summary of my perl5 (revision 5 version 28 subversion 2) configuration:
Platform:
osname=openbsd
osvers=6.6
archname=amd64-openbsd
uname='openbsd'
config_args='-dsE -Dopenbsd_distribution=defined -Dccflags=-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -Dmksymlinks'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='cc'
ccflags ='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -I/usr/local/include'
optimize='-O2'
cppflags='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='4.2.1 Compatible OpenBSD Clang 8.0.1 (tags/RELEASE_801/final)'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags ='-Wl,-E -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/lib /usr/lib
libs=-lm -lc
perllibs=-lm -lc
libc=/usr/lib/libc.a
so=so
useshrplib=true
libperl=libperl.so.19.0
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-R/usr/libdata/perl5/amd64-openbsd/CORE'
cccdlflags='-DPIC -fPIC '
lddlflags='-shared -fPIC -fstack-protector-strong -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_CTYPE
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
Built under openbsd
%ENV:
PERL5LIB="/home/vagrant/perl5/lib/perl5:/home/vagrant/perl5/lib/perl5"
PERL5OPT=""
PERL5_CPANPLUS_IS_RUNNING="67216"
PERL5_CPAN_IS_RUNNING="67216"
PERL_LOCAL_LIB_ROOT="/home/vagrant/perl5:/home/vagrant/perl5"
PERL_MB_OPT="--install_base "/home/vagrant/perl5""
PERL_MM_OPT="INSTALL_BASE=/home/vagrant/perl5"
@INC:
/home/vagrant/perl5/lib/perl5/5.28.2/amd64-openbsd
/home/vagrant/perl5/lib/perl5/5.28.2
/home/vagrant/perl5/lib/perl5/amd64-openbsd
/home/vagrant/perl5/lib/perl5
/home/vagrant/perl5/lib/perl5/5.28.2/amd64-openbsd
/home/vagrant/perl5/lib/perl5/5.28.2
/home/vagrant/perl5/lib/perl5/amd64-openbsd
/home/vagrant/perl5/lib/perl5
/usr/local/libdata/perl5/site_perl/amd64-openbsd
/usr/local/libdata/perl5/site_perl
/usr/libdata/perl5/amd64-openbsd
/usr/libdata/perl5
bash-5.0$ unzip -v
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.2.1 Compatible OpenBSD Clang 8.0.1 (tags/RELEASE_801/final) for Unix on Oct 11 2019.
UnZip special compilation options:
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: other] (handle UTF-8 paths)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
VMS_TEXT_CONV
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
@zsan, @glasswalk3r: I'm making progress with that Archive::Zip test clean-up, but rather slowly ... weekend work mostly. The test infrastructure is mostly ready, though, so:
If you don't mind testing pre-release stuff, you might want to get my current dev branch and do the usual perl Makefile.PL; make; make test
on the platforms where you noticed above problems.
Please run both:
make test
and
# get more disagnostic information
AUTOMATED_TESTING=1 make test
and post test results here.
Thanks!
Just tried your dev branch on CentOS 6.10 (x64):
# AUTOMATED_TESTING=1 make test PERL_DL_NONLAZY=1 "/usr/local/perl/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, '\ blib/lib', 'blib/arch')" t/*.t t/01_init.t ................... 1/2 # Calling "unzip" resulted in: # UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send # bug reports using http://www.info-zip.org/zip-bug.html; see README for details. # # Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] # Default action is to extract files in list, except those in xlist, to exdir; # file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage). # # -p extract files to pipe, no messages -l list files (short format) # -f freshen existing files, create none -t test compressed archive data # -u update files, create if necessary -z display archive comment only # -v list verbosely/show version info -T timestamp archive to latest # -x exclude files that follow (in xlist) -d extract files into exdir # modifiers: # -n never overwrite existing files -q quiet mode (-qq => quieter) # -o overwrite files WITHOUT prompting -a auto-convert any text files # -j junk paths (do not make directories) -aa treat ALL files as text # -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields # -C match filenames case-insensitively -L make (some) names lowercase # -X restore UID/GID info -V retain VMS version numbers # -K keep setuid/setgid/tacky permissions -M pipe through "more" pager # -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives # -I CHARSET specify a character encoding for UNIX and other archives # # See "unzip -hh" or unzip.txt for more help. Examples: # unzip data1 -x joe => extract all files except joe from zipfile data1.zip # unzip -p foo | more => send contents of foo.zip via pipe into program more # unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer # Exit value 0 t/01_init.t ................... ok t/02_main.t ................... 1/? # Non-zero exit value on reference # "unzip -t" returned non-zero exit value 256 on file "t/data/emptyzip.zip" # (which might be entirely OK on your operating system) and resulted in the # following output: # Archive: t/data/emptyzip.zip # warning [t/data/emptyzip.zip]: zipfile is empty # Non-zero exit value # "unzip -t" returned non-zero exit value 256 on file "/tmp/testout-BL7X1.zip" # (which might be entirely OK on your operating system) and resulted in the # following output: # Archive: /tmp/testout-BL7X1.zip # warning [/tmp/testout-BL7X1.zip]: zipfile is empty # Non-zero exit value # "unzip -t" returned non-zero exit value 256 on file "/tmp/testout-BL7X1.zip" # (which might be entirely OK on your operating system) and resulted in the # following output: # Archive: /tmp/testout-BL7X1.zip # warning [/tmp/testout-BL7X1.zip]: zipfile is empty # Non-zero exit value # "unzip -t" returned non-zero exit value 256 on file "/tmp/testout-BL7X1.zip" # (which might be entirely OK on your operating system) and resulted in the # following output: # Archive: /tmp/testout-BL7X1.zip # warning [/tmp/testout-BL7X1.zip]: zipfile is empty t/02_main.t ................... ok t/03_ex.t ..................... ok t/04_readmember.t ............. ok t/05_tree.t ................... ok t/06_update.t ................. ok t/07_filenames_of_0.t ......... ok t/08_readmember_record_sep.t .. ok t/09_output_record_sep.t ...... ok t/10_chmod.t .................. ok t/11_explorer.t ............... ok t/12_bug_47223.t .............. skipped: Only required on Win32. t/13_bug_46303.t .............. ok t/14_leading_separator.t ...... ok t/15_decrypt.t ................ ok t/16_decrypt.t ................ ok t/17_101092.t ................. ok t/18_bug_92205.t .............. ok t/19_bug_101240.t ............. ok t/20_bug_github11.t ........... ok t/21_zip64.t .................. ok t/22_deflated_dir.t ........... ok t/23_closed_handle.t .......... ok t/24_unicode_win32.t .......... ok t/25_traversal.t .............. ok t/26_bzip2.t .................. 1/8 # Failed test 'write and test zip file - test write piped' # at t/26_bzip2.t line 31. # Got result: # Archive: /tmp/testout-cHYft.zip # skipping: README need PK compat. v4.6 (can do v4.5) # Caution: zero files tested in /tmp/testout-cHYft.zip. # 1 file skipped because of unsupported compression or encoding. # Exit value 20736 # Failed test 'write and test zip file - test write plain' # at t/26_bzip2.t line 31. # Got result: # Archive: /tmp/testout-cHYft.zip # skipping: README need PK compat. v4.6 (can do v4.5) # Caution: zero files tested in /tmp/testout-cHYft.zip. # 1 file skipped because of unsupported compression or encoding. # Exit value 20736 # Looks like you failed 2 tests of 8. t/26_bzip2.t .................. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/8 subtests t/27_symlinks.t ............... ok t/28_zip64_unsupported.t ...... skipped: Zip64 format is supported. Test Summary Report ------------------- t/26_bzip2.t (Wstat: 512 Tests: 8 Failed: 2) Failed tests: 6, 8 Non-zero exit status: 2 Files=28, Tests=909, 7 wallclock secs ( 0.17 usr 0.05 sys + 5.22 cusr 1.30 csys = 6.74 CPU) Result: FAIL Failed 1/28 test programs. 2/909 subtests failed. make: *** [test_dynamic] Error 255 #
If you don't mind testing pre-release stuff, you might want to get my current dev branch and do the usual
perl Makefile.PL; make; make test
on the platforms where you noticed above problems.Please run both:
make test
and
# get more disagnostic information AUTOMATED_TESTING=1 make test
and post test results here.
Sure, here you go:
-bash-5.0$ git remote -v
origin https://github.com/farblos/perl-Archive-Zip.git (fetch)
origin https://github.com/farblos/perl-Archive-Zip.git (push)
-bash-5.0$ git branch | head
master
* origin/test-redesign-dev
-bash-5.0$ git show | head
commit 59dd2a8d2c92ed0487f2a9d6191dd0b1844e27f7
Merge: 7a363ed 4faf58b
Author: Fred Moyer <fred@redhotpenguin.com>
Date: Mon Oct 14 10:22:10 2019 -0700
Merge pull request #64 from farblos/bug-tracker-update
Switch to GitHub as issue tracker
-bash-5.0$ AUTOMATED_TESTING=1 make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_compile.t ................ ok
t/02_main.t ................... ok
t/03_ex.t ..................... ok
t/04_readmember.t ............. ok
t/05_tree.t ................... ok
t/06_update.t ................. ok
t/07_filenames_of_0.t ......... ok
t/08_readmember_record_sep.t .. ok
t/09_output_record_sep.t ...... ok
t/10_chmod.t .................. ok
t/11_explorer.t ............... ok
t/12_bug_47223.t .............. skipped: Only required on Win32.
t/13_bug_46303.t .............. ok
t/14_leading_separator.t ...... ok
t/15_decrypt.t ................ ok
t/16_decrypt.t ................ ok
t/17_101092.t ................. ok
t/18_bug_92205.t .............. ok
t/19_bug_101240.t ............. ok
t/20_bug_github11.t ........... ok
t/21_zip64.t .................. skipped: Zip64 format not supported.
t/22_deflated_dir.t ........... ok
t/23_closed_handle.t .......... ok
t/24_unicode_win32.t .......... ok
t/25_traversal.t .............. ok
t/26_bzip2.t .................. ziptest said: Archive: /tmp/testout-5hGDi.zip
skipping: README need PK compat. v4.6 (can do v4.5)
Caution: zero files tested in /tmp/testout-5hGDi.zip.
1 file skipped because of unsupported compression or encoding.
t/26_bzip2.t .................. ok
t/27_symlinks.t ............... ok
t/28_zip64_unsupported.t ...... ok
All tests successful.
Files=28, Tests=662, 60 wallclock secs ( 1.24 usr 0.62 sys + 43.57 cusr 13.21 csys = 58.64 CPU)
Result: PASS
More details:
-bash-5.0$ uname -a
OpenBSD foo.my.domain 6.6 GENERIC#298 i386
-bash-5.0$ perl -V
Summary of my perl5 (revision 5 version 28 subversion 2) configuration:
Platform:
osname=openbsd
osvers=6.6
archname=i386-openbsd
uname='openbsd'
config_args='-dsE -Dopenbsd_distribution=defined -Dccflags=-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -Dmksymlinks'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=undef
use64bitall=undef
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='cc'
ccflags ='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -I/usr/local/include'
optimize='-O2'
cppflags='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='4.2.1 Compatible OpenBSD Clang 8.0.1 (tags/RELEASE_801/final)'
gccosandvers=''
intsize=4
longsize=4
ptrsize=4
doublesize=8
byteorder=1234
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=12
longdblkind=3
ivtype='long'
ivsize=4
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=4
prototype=define
Linker and Libraries:
ld='cc'
ldflags ='-Wl,-E -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/lib /usr/lib
libs=-lm -lc
perllibs=-lm -lc
libc=/usr/lib/libc.a
so=so
useshrplib=true
libperl=libperl.so.19.0
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-R/usr/libdata/perl5/i386-openbsd/CORE'
cccdlflags='-DPIC -fPIC '
lddlflags='-shared -fPIC -fstack-protector-strong -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_CTYPE
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
Built under openbsd
%ENV:
PERL5LIB="/home/alceu/perl5/lib/perl5"
PERL_LOCAL_LIB_ROOT="/home/alceu/perl5"
PERL_MB_OPT="--install_base "/home/alceu/perl5""
PERL_MM_OPT="INSTALL_BASE=/home/alceu/perl5"
@INC:
/home/alceu/perl5/lib/perl5/5.28.2/i386-openbsd
/home/alceu/perl5/lib/perl5/5.28.2
/home/alceu/perl5/lib/perl5/i386-openbsd
/home/alceu/perl5/lib/perl5
/usr/local/libdata/perl5/site_perl/i386-openbsd
/usr/local/libdata/perl5/site_perl
/usr/libdata/perl5/i386-openbsd
/usr/libdata/perl5
-bash-5.0$ unzip -v
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.2.1 Compatible OpenBSD Clang 8.0.1 (tags/RELEASE_801/final) for Unix (Intel 486) on Oct 9 2019.
UnZip special compilation options:
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: other] (handle UTF-8 paths)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
VMS_TEXT_CONV
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
@younda: that test (t/26_bzip2.t
) I hadn't completely processed yet. Done in latest commit.
@glasswalk3r: You're at branch master
of my fork - please switch to branch test-redesign-dev
, which contains all the nices changes.
@ both: Thanks for testing!
Sorry @farblos , here are the tests from correct branch:
-bash-5.0$ git checkout test-redesign-dev
Branch 'test-redesign-dev' set up to track remote branch 'test-redesign-dev' from 'origin'.
Switched to a new branch 'test-redesign-dev'
-bash-5.0$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Archive::Zip
Writing MYMETA.yml and MYMETA.json
-bash-5.0$ make
cp lib/Archive/Zip/FAQ.pod blib/lib/Archive/Zip/FAQ.pod
cp lib/Archive/Zip/MockFileHandle.pm blib/lib/Archive/Zip/MockFileHandle.pm
cp lib/Archive/Zip/Archive.pm blib/lib/Archive/Zip/Archive.pm
cp lib/Archive/Zip/MemberRead.pm blib/lib/Archive/Zip/MemberRead.pm
cp lib/Archive/Zip/ZipFileMember.pm blib/lib/Archive/Zip/ZipFileMember.pm
cp lib/Archive/Zip/DirectoryMember.pm blib/lib/Archive/Zip/DirectoryMember.pm
cp lib/Archive/Zip/StringMember.pm blib/lib/Archive/Zip/StringMember.pm
cp lib/Archive/Zip/Member.pm blib/lib/Archive/Zip/Member.pm
cp lib/Archive/Zip/FileMember.pm blib/lib/Archive/Zip/FileMember.pm
cp lib/Archive/Zip/Tree.pm blib/lib/Archive/Zip/Tree.pm
cp lib/Archive/Zip/NewFileMember.pm blib/lib/Archive/Zip/NewFileMember.pm
cp lib/Archive/Zip/BufferedFileHandle.pm blib/lib/Archive/Zip/BufferedFileHandle.pm
cp lib/Archive/Zip.pm blib/lib/Archive/Zip.pm
cp script/crc32 blib/script/crc32
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/crc32
Option section requires an argument
Manifying 4 pod documents
-bash-5.0$ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_init.t ................... ok
t/02_main.t ................... ok
t/03_ex.t ..................... ok
t/04_readmember.t ............. ok
t/05_tree.t ................... ok
t/06_update.t ................. ok
t/07_filenames_of_0.t ......... ok
t/08_readmember_record_sep.t .. ok
t/09_output_record_sep.t ...... ok
t/10_chmod.t .................. ok
t/11_explorer.t ............... ok
t/12_bug_47223.t .............. skipped: Only required on Win32.
t/13_bug_46303.t .............. ok
t/14_leading_separator.t ...... ok
t/15_decrypt.t ................ ok
t/16_decrypt.t ................ ok
t/17_101092.t ................. ok
t/18_bug_92205.t .............. ok
t/19_bug_101240.t ............. ok
t/20_bug_github11.t ........... ok
t/21_zip64.t .................. skipped: Zip64 format not supported.
t/22_deflated_dir.t ........... ok
t/23_closed_handle.t .......... ok
t/24_unicode_win32.t .......... ok
t/25_traversal.t .............. ok
t/26_bzip2.t .................. 1/8
# Failed test 'write and test zip file - test write piped'
# at t/26_bzip2.t line 31.
# Got result:
# Archive: /tmp/testout-rqLqk.zip
# skipping: README need PK compat. v4.6 (can do v4.5)
# Caution: zero files tested in /tmp/testout-rqLqk.zip.
# 1 file skipped because of unsupported compression or encoding.
# Exit value 20736
# Failed test 'write and test zip file - test write plain'
# at t/26_bzip2.t line 31.
# Got result:
# Archive: /tmp/testout-rqLqk.zip
# skipping: README need PK compat. v4.6 (can do v4.5)
# Caution: zero files tested in /tmp/testout-rqLqk.zip.
# 1 file skipped because of unsupported compression or encoding.
# Exit value 20736
# Looks like you failed 2 tests of 8.
t/26_bzip2.t .................. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/8 subtests
t/27_symlinks.t ............... ok
t/28_zip64_unsupported.t ...... ok
Test Summary Report
-------------------
t/26_bzip2.t (Wstat: 512 Tests: 8 Failed: 2)
Failed tests: 6, 8
Non-zero exit status: 2
Files=28, Tests=500, 66 wallclock secs ( 1.22 usr 0.49 sys + 45.58 cusr 16.04 csys = 63.33 CPU)
Result: FAIL
Failed 1/28 test programs. 2/500 subtests failed.
*** Error 255 in /home/alceu/projects/perl-Archive-Zip (Makefile:928 'test_dynamic')
But it seems I lost the latest commit (9b27d54bc8dc879a172365ab0a98ab2f3a15bdef):
-bash-5.0$ make tests
make: don't know how to make tests
Stop in /home/alceu/projects/perl-Archive-Zip
-bash-5.0$ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_init.t ................... ok
t/02_main.t ................... ok
t/03_ex.t ..................... ok
t/04_readmember.t ............. ok
t/05_tree.t ................... ok
t/06_update.t ................. ok
t/07_filenames_of_0.t ......... ok
t/08_readmember_record_sep.t .. ok
t/09_output_record_sep.t ...... ok
t/10_chmod.t .................. ok
t/11_explorer.t ............... ok
t/12_bug_47223.t .............. skipped: Only required on Win32.
t/13_bug_46303.t .............. ok
t/14_leading_separator.t ...... ok
t/15_decrypt.t ................ ok
t/16_decrypt.t ................ ok
t/17_101092.t ................. ok
t/18_bug_92205.t .............. ok
t/19_bug_101240.t ............. ok
t/20_bug_github11.t ........... ok
t/21_zip64.t .................. skipped: Zip64 format not supported.
t/22_deflated_dir.t ........... ok
t/23_closed_handle.t .......... ok
t/24_unicode_win32.t .......... ok
t/25_traversal.t .............. ok
t/26_bzip2.t .................. ok
t/27_symlinks.t ............... ok
t/28_zip64_unsupported.t ...... ok
All tests successful.
Files=28, Tests=500, 65 wallclock secs ( 1.29 usr 0.47 sys + 45.65 cusr 16.07 csys = 63.48 CPU)
Result: PASS
With more details:
-bash-5.0$ prove -l -v -m t/26_bzip2.t
t/26_bzip2.t ..
1..8
ok 1 - An object of class 'Archive::Zip::Archive' isa 'Archive::Zip'
ok 2
ok 3 - write and test zip file - open piped handle
ok 4 - write and test zip file - write piped
ok 5 - write and test zip file - close piped handle
# Non-zero exit value on reference
# "unzip -t" returned non-zero exit value 20736 on file "t/data/bzip.zip"
# (which might be entirely OK on your operating system) and resulted in the
# following output:
# Archive: t/data/bzip.zip
# skipping: README need PK compat. v4.6 (can do v4.5)
# Caution: zero files tested in t/data/bzip.zip.
# 1 file skipped because of unsupported compression or encoding.
ok 6 - write and test zip file - test write piped
# Non-zero exit value
# "unzip -t" returned non-zero exit value 20736 on file "/tmp/testout-kBqjk.zip"
# (which might be entirely OK on your operating system) and resulted in the
# following output:
# Archive: /tmp/testout-kBqjk.zip
# skipping: README need PK compat. v4.6 (can do v4.5)
# Caution: zero files tested in /tmp/testout-kBqjk.zip.
# 1 file skipped because of unsupported compression or encoding.
ok 7 - write and test zip file - write plain
ok 8 - write and test zip file - test write plain
# Non-zero exit value
# "unzip -t" returned non-zero exit value 20736 on file "/tmp/testout-kBqjk.zip"
# (which might be entirely OK on your operating system) and resulted in the
# following output:
# Archive: /tmp/testout-kBqjk.zip
# skipping: README need PK compat. v4.6 (can do v4.5)
# Caution: zero files tested in /tmp/testout-kBqjk.zip.
# 1 file skipped because of unsupported compression or encoding.
ok
All tests successful.
Files=1, Tests=8, 2 wallclock secs ( 0.27 usr 0.07 sys + 1.26 cusr 0.49 csys = 2.09 CPU)
Result: PASS
Thanks, @glasswalk3r, exactly as expected ... will continue brushing up tests.
Any progress? Last commit was 23-10-2019 and current git checkout does not FAIL, but is very noisy:
Archive-Zip-git $ prove -vwb t/26_bzip2.t
t/26_bzip2.t ..
1..1
ziptest said: Archive: /tmp/testout-hkWxd.zip
skipping: README need PK compat. v4.6 (can do v4.5)
Caution: zero files tested in /tmp/testout-hkWxd.zip.
1 file skipped because of unsupported compression or encoding.
ok 1 - testZip ok after t/data/bzip.zip to /tmp/testout-hkWxd.zip
ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.11 cusr 0.00 csys = 0.13 CPU)
Result: PASS
@Tux: You might want to track https://github.com/farblos/perl-Archive-Zip/commits/test-redesign-dev as a progress meter instead. There are still some 5-10 tests missing brush up, and I hope to find some time during the next days to tackle these.
@farblos I am hitting the same t/26 error on darwin 19.3
Did some poking around and can replicate the same error on the commandline by running unzip -t on the t/26 bzip test file.
This stackoverflow answer is pointing the blame at limitations in ZLIB. From the reports it appears this is only a problem on *BSD and darwin.
Installing 7-zip and running 7za from the commandline on the t/26 bzip testfile - error gone and you get the expected test results.
I'm guessing from your commits that you are bumping into this issue now and probably know all of this.
@redhotpenguin We install this module as part of an automation script after creating new VMs. I've seen this intermittently fail our script on Ubuntu1204-1804 and CentOS6-7 distros, though it worked fine in my most recent runs. Not your problem but thought I'd share the distros I've seen it on.
Is there anywhere I can find the most recent stable version of this module? Thanks
past releases are always available at https://metacpan.org/release/Archive-Zip (see the left sidebar).
@gobuchul:
I'm guessing from your commits that you are bumping into this issue now and probably know all of this.
Maybe not all of it, but the test redo should take care of what you've described, yes.
@RobMcGee:
In addition to what karenetheridge has said: Unfortunately there have been quite some changes in the last releases (64bit support, bzip2 pipe-through) that could provoke your test failures. I think you should go back at least to Archive::Zip1.64 to not get the test failures.
Besides that, I'm nearly done - only two tests to be brushed up are left!
That's the answer I was looking for, we don't need the recent changes for our automation purposes. Thanks for your help guys. Dog bless.
@redhotpenguin: I'm finally through with the tests - all shiny, all new, see PR #73. Please merge. Changes should be up-to-date already, so you could also bump version and release it to CPAN.
@redhotpenguin , just installed the current version on OpenBSD 6.7, all is working as expected. I think this issue can be closed now.
Hi,
I am on mac os Mojave, 10.14.6 (18G103) Perl version 5.28.0
And i have this error log when i try to install the module.
Also, just FYI, someone already posted the issue here:
https://rt.cpan.org/Public/Bug/Display.html?id=130773