From 0733fb1a9e3c0c586f9a958aa7f26fcfa7292b78 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 27 Feb 2019 20:14:36 +0100 Subject: Adding upstream version 0.13. Signed-off-by: Daniel Baumann --- testsuite/check.sh | 39 ++++++++++++++++++++++++++++++++++++++- testsuite/test3_em1.tar.lz | Bin 0 -> 392 bytes testsuite/test3_em2.tar.lz | Bin 0 -> 392 bytes testsuite/test3_em3.tar.lz | Bin 0 -> 392 bytes testsuite/test3_em4.tar.lz | Bin 0 -> 392 bytes testsuite/test3_em5.tar.lz | Bin 0 -> 392 bytes testsuite/test3_em6.tar.lz | Bin 0 -> 500 bytes testsuite/ts_in_link.tar.lz | Bin 0 -> 509 bytes 8 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 testsuite/test3_em1.tar.lz create mode 100644 testsuite/test3_em2.tar.lz create mode 100644 testsuite/test3_em3.tar.lz create mode 100644 testsuite/test3_em4.tar.lz create mode 100644 testsuite/test3_em5.tar.lz create mode 100644 testsuite/test3_em6.tar.lz create mode 100644 testsuite/ts_in_link.tar.lz (limited to 'testsuite') diff --git a/testsuite/check.sh b/testsuite/check.sh index f8b65c3..aea9fbf 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -68,6 +68,7 @@ lzlib_1_11() { [ ${lwarn} = 0 ] && # t155.tar[.lz]: directory + links + file + eof, all with 155 char names # tar_in_tlz1.tar.lz 2 members (test.txt.tar test3.tar) 3 lzip members # tar_in_tlz2.tar.lz 2 members (test.txt.tar test3.tar) 5 lzip members +# ts_in_link.tar.lz: 4 symbolic links (link[1-4]) to / /dir/ dir/ dir(107/) # test_bad1.tar.lz: truncated at offset 6000 (of 7495) # test_bad2.tar.lz: byte at offset 6000 changed from 0x56 to 0x46 # test3.tar: 3 members (foo bar baz) + 2 zeroed 512-byte blocks @@ -89,6 +90,8 @@ lzlib_1_11() { [ ${lwarn} = 0 ] && # test3_eof1.tar.lz: test3.tar.lz without eof blocks # test3_eof2.tar.lz: test3.tar.lz with only one eof block # test3_eof3.tar.lz: test3.tar.lz with one zeroed block between foo and bar +# test3_em?.tar.lz: test3.tar.lz with one empty lzip member at each position +# test3_em6.tar.lz: test3.tar.lz preceded by four empty lzip members # tlz_in_tar1.tar: 1 member (test3.tar.lz) first magic damaged # tlz_in_tar2.tar: 2 members (foo test3.tar.lz) first magic damaged # ug32chars.tar.lz: 1 member (foo) with 32-character owner and group names @@ -263,7 +266,8 @@ cmp cfoo foo || test_failed $LINENO [ ! -e bar ] || test_failed $LINENO [ ! -e baz ] || test_failed $LINENO rm -f foo bar baz || framework_failure -# + +# test --list and --extract tar in tar.lz for i in "${tarint1_lz}" "${tarint2_lz}" ; do for j in 0 2 6 ; do "${TARLZ}" -tf "$i" --threads=$j > out$j || @@ -284,6 +288,31 @@ for i in "${tarint1_lz}" "${tarint2_lz}" ; do rm -f test.txt.tar test3.tar || framework_failure done +# test --list and --extract with empty lzip members +for i in 1 2 3 4 5 6 ; do + for j in 0 2 6 ; do + "${TARLZ}" -tf "${testdir}"/test3_em${i}.tar.lz --threads=$j \ + > out$j || test_failed $LINENO "$i $j" + "${TARLZ}" -tvf "${testdir}"/test3_em${i}.tar.lz --threads=$j \ + > outv$j || test_failed $LINENO "$i $j" + done + diff -u out0 out2 || test_failed $LINENO $i + diff -u out0 out6 || test_failed $LINENO $i + diff -u out2 out6 || test_failed $LINENO $i + diff -u outv0 outv2 || test_failed $LINENO $i + diff -u outv0 outv6 || test_failed $LINENO $i + diff -u outv2 outv6 || test_failed $LINENO $i + rm -f out0 out2 out6 outv0 outv2 outv6 || framework_failure + for j in 0 2 6 ; do + "${TARLZ}" -xf "${testdir}"/test3_em${i}.tar.lz --threads=$j || + test_failed $LINENO "$i $j" + cmp cfoo foo || test_failed $LINENO "$i $j" + cmp cbar bar || test_failed $LINENO "$i $j" + cmp cbaz baz || test_failed $LINENO "$i $j" + rm -f foo bar baz || framework_failure + done +done + # test --concatenate cat "${in_tar_lz}" > out.tar.lz || framework_failure "${TARLZ}" -Af out.tar.lz "${test3_lz}" || test_failed $LINENO @@ -490,12 +519,16 @@ if ln dummy_file dummy_link 2> /dev/null && ln dir1/dir2/dir3/in dir1/dir2/dir3/"${name_100}" || framework_failure ln dir1/dir2/dir3/in "${path_100}" || framework_failure ln dir1/dir2/dir3/in "${path_106}" || framework_failure + ln -s dir2/ dir1/dir2_link || framework_failure ln -s in dir1/dir2/dir3/link || framework_failure ln -s "${name_100}" dir1/dir2/dir3/link_100 || framework_failure "${TARLZ}" -0 -cf out.tar.lz dir1 || test_failed $LINENO + "${TARLZ}" -df out.tar.lz || test_failed $LINENO rm -rf dir1 || framework_failure "${TARLZ}" -xf out.tar.lz || test_failed $LINENO + "${TARLZ}" -df out.tar.lz || test_failed $LINENO cmp "${in}" dir1/dir2/dir3/in || test_failed $LINENO + cmp "${in}" dir1/dir2_link/dir3/in || test_failed $LINENO cmp "${in}" dir1/dir2/dir3/"${name_100}" || test_failed $LINENO cmp "${in}" "${path_100}" || test_failed $LINENO cmp "${in}" "${path_106}" || test_failed $LINENO @@ -511,6 +544,10 @@ if ln dummy_file dummy_link 2> /dev/null && "${TARLZ}" -0 -q -c ../tmp/dir1 | "${TARLZ}" -x || test_failed $LINENO diff -ru tmp/dir1 dir1 || test_failed $LINENO rm -rf tmp/dir1 dir1 || framework_failure + "${TARLZ}" -xf "${testdir}"/ts_in_link.tar.lz || test_failed $LINENO + "${TARLZ}" -df "${testdir}"/ts_in_link.tar.lz --ignore-ids || + test_failed $LINENO + rm -f link1 link2 link3 link4 || framework_failure else printf "\nwarning: skipping link test: 'ln' does not work on your system." fi diff --git a/testsuite/test3_em1.tar.lz b/testsuite/test3_em1.tar.lz new file mode 100644 index 0000000..0aa8724 Binary files /dev/null and b/testsuite/test3_em1.tar.lz differ diff --git a/testsuite/test3_em2.tar.lz b/testsuite/test3_em2.tar.lz new file mode 100644 index 0000000..4fe4e5d Binary files /dev/null and b/testsuite/test3_em2.tar.lz differ diff --git a/testsuite/test3_em3.tar.lz b/testsuite/test3_em3.tar.lz new file mode 100644 index 0000000..49e2eab Binary files /dev/null and b/testsuite/test3_em3.tar.lz differ diff --git a/testsuite/test3_em4.tar.lz b/testsuite/test3_em4.tar.lz new file mode 100644 index 0000000..95df508 Binary files /dev/null and b/testsuite/test3_em4.tar.lz differ diff --git a/testsuite/test3_em5.tar.lz b/testsuite/test3_em5.tar.lz new file mode 100644 index 0000000..706beb5 Binary files /dev/null and b/testsuite/test3_em5.tar.lz differ diff --git a/testsuite/test3_em6.tar.lz b/testsuite/test3_em6.tar.lz new file mode 100644 index 0000000..806884d Binary files /dev/null and b/testsuite/test3_em6.tar.lz differ diff --git a/testsuite/ts_in_link.tar.lz b/testsuite/ts_in_link.tar.lz new file mode 100644 index 0000000..dff816c Binary files /dev/null and b/testsuite/ts_in_link.tar.lz differ -- cgit v1.2.3