t5004: require 64-bit support for big ZIP tests

Check if unzip supports the ZIP64 format and skip the tests that create big archives otherwise. Also skip the test that archives a big file on 32-bit platforms because the git object systems can't unpack files bigger than 4GB there. Reported-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Apr 30, 2017 at 09:53 UTC 867e40ff3a731d9cf4ab1900a83ca21a9c2c8fae
1 file changed +7 -2
t/t5004-archive-corner-cases.sh
+7 -2
@@ -27,6 +27,9 @@ check_dir() {
27 test_cmp expect actual
28 }
29
30 +test_lazy_prereq UNZIP_ZIP64_SUPPORT '
31 + "$GIT_UNZIP" -v | grep ZIP64_SUPPORT
32 +'
33
34 # bsdtar/libarchive versions before 3.1.3 consider a tar file with a
35 # global pax header that is not followed by a file record as corrupt.
@@ -155,7 +158,8 @@ test_expect_success ZIPINFO 'zip archive with many entries' '
158 test_cmp expect actual
159 '
160
158 -test_expect_success EXPENSIVE,UNZIP 'zip archive bigger than 4GB' '
161 +test_expect_success EXPENSIVE,UNZIP,UNZIP_ZIP64_SUPPORT \
162 + 'zip archive bigger than 4GB' '
163 # build string containing 65536 characters
164 s=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef &&
165 s=$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s &&
@@ -178,7 +182,8 @@ test_expect_success EXPENSIVE,UNZIP 'zip archive bigger than 4GB' '
182 "$GIT_UNZIP" -t many-big.zip
183 '
184
181 -test_expect_success EXPENSIVE,UNZIP,ZIPINFO 'zip archive with files bigger than 4GB' '
185 +test_expect_success EXPENSIVE,LONG_IS_64BIT,UNZIP,UNZIP_ZIP64_SUPPORT,ZIPINFO \
186 + 'zip archive with files bigger than 4GB' '
187 # Pack created with:
188 # dd if=/dev/zero of=file bs=1M count=4100 && git hash-object -w file
189 mkdir -p .git/objects/pack &&