Merging upstream version 0.28.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
9c81793bca
commit
ca8e65110f
26 changed files with 1067 additions and 716 deletions
|
@ -112,7 +112,12 @@ cyg_symlink() { [ ${lwarnc} = 0 ] &&
|
|||
"${TARLZ}" --check-lib # just print warning
|
||||
[ $? != 2 ] || test_failed $LINENO # unless bad lzlib.h
|
||||
|
||||
printf "testing tarlz-%s..." "$2"
|
||||
time_bits=`"${TARLZ}" --time-bits` || test_failed $LINENO
|
||||
if [ ${time_bits} -le 32 ] ; then
|
||||
printf "warning: 'time_t' has ${time_bits} bits. Some time comparisons may fail and\n"
|
||||
printf " tarlz will stop working on this system in 2038.\n"
|
||||
fi
|
||||
printf "testing tarlz-%s... (time bits = %u)" "$2" "${time_bits}"
|
||||
|
||||
"${TARLZ}" -q -tf "${in}"
|
||||
[ $? = 2 ] || test_failed $LINENO
|
||||
|
@ -184,7 +189,7 @@ done
|
|||
[ $? = 1 ] || test_failed $LINENO
|
||||
"${TARLZ}" -q -tf in.tar.lz "" # empty non-option argument
|
||||
[ $? = 1 ] || test_failed $LINENO
|
||||
"${TARLZ}" --help > /dev/null || test_failed $LINENO
|
||||
"${TARLZ}" -? > /dev/null || test_failed $LINENO
|
||||
"${TARLZ}" -V > /dev/null || test_failed $LINENO
|
||||
"${TARLZ}" --bad_option -tf t3.tar.lz 2> /dev/null
|
||||
[ $? = 1 ] || test_failed $LINENO
|
||||
|
@ -215,15 +220,37 @@ for i in 0 2 6 ; do
|
|||
cmp "${in}" test.txt || test_failed $LINENO $i
|
||||
rm -f test.txt || framework_failure
|
||||
done
|
||||
"${TARLZ}" -q -tf in.tar foo
|
||||
[ $? = 1 ] || test_failed $LINENO
|
||||
"${TARLZ}" -q -tf in.tar.lz foo
|
||||
[ $? = 1 ] || test_failed $LINENO
|
||||
|
||||
# test3 reference files for -t and -tv (list3, vlist3)
|
||||
"${TARLZ}" -tf t3.tar > list3 || test_failed $LINENO
|
||||
"${TARLZ}" -tvf t3.tar > vlist3 || test_failed $LINENO
|
||||
"${TARLZ}" -tf t3.tar -T list3 > out || test_failed $LINENO
|
||||
diff -u list3 out || test_failed $LINENO
|
||||
printf "foo\nbar/\nbaz\n" | "${TARLZ}" -tf t3.tar -T- > out || test_failed $LINENO
|
||||
diff -u list3 out || test_failed $LINENO
|
||||
"${TARLZ}" -tvf t3.tar -T list3 > out || test_failed $LINENO
|
||||
diff -u vlist3 out || test_failed $LINENO
|
||||
printf "foo\nbar\nbaz\n" | "${TARLZ}" -tvf t3.tar -T- > out || test_failed $LINENO
|
||||
diff -u vlist3 out || test_failed $LINENO
|
||||
for i in 0 2 6 ; do
|
||||
"${TARLZ}" -n$i -tf t3.tar.lz > out || test_failed $LINENO $i
|
||||
diff -u list3 out || test_failed $LINENO $i
|
||||
"${TARLZ}" -n$i -tf t3.tar.lz -T list3 > out || test_failed $LINENO $i
|
||||
diff -u list3 out || test_failed $LINENO $i
|
||||
printf "foo\nbar\nbaz\n" | "${TARLZ}" -n$i -tf t3.tar.lz -T- > out ||
|
||||
test_failed $LINENO $i
|
||||
diff -u list3 out || test_failed $LINENO $i
|
||||
"${TARLZ}" -n$i -tvf t3.tar.lz > out || test_failed $LINENO $i
|
||||
diff -u vlist3 out || test_failed $LINENO $i
|
||||
"${TARLZ}" -n$i -tvf t3.tar.lz -T list3 > out || test_failed $LINENO $i
|
||||
diff -u vlist3 out || test_failed $LINENO $i
|
||||
printf "foo\nbar\nbaz\n" | "${TARLZ}" -n$i -tvf t3.tar.lz -T- > out ||
|
||||
test_failed $LINENO $i
|
||||
diff -u vlist3 out || test_failed $LINENO $i
|
||||
done
|
||||
rm -f out || framework_failure
|
||||
|
||||
|
@ -334,6 +361,13 @@ for i in t3_dir.tar t3_dir.tar.lz ; do
|
|||
cmp cbar dir/bar || test_failed $LINENO "$i"
|
||||
cmp cbaz dir/baz || test_failed $LINENO "$i"
|
||||
rm -rf dir || framework_failure
|
||||
"${TARLZ}" -q -R -tf "$i" dir || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -q -R -xf "$i" dir || test_failed $LINENO "$i"
|
||||
[ -d dir ] || test_failed $LINENO "$i"
|
||||
[ ! -e dir/foo ] || test_failed $LINENO "$i"
|
||||
[ ! -e dir/bar ] || test_failed $LINENO "$i"
|
||||
[ ! -e dir/baz ] || test_failed $LINENO "$i"
|
||||
rm -rf dir || framework_failure
|
||||
"${TARLZ}" -q -tf "$i" dir/foo dir/baz || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -q -xf "$i" dir/foo dir/baz || test_failed $LINENO "$i"
|
||||
cmp cfoo dir/foo || test_failed $LINENO "$i"
|
||||
|
@ -368,11 +402,17 @@ for i in 0 2 6 ; do
|
|||
[ ! -e dir ] || test_failed $LINENO $i
|
||||
rm -rf dir || framework_failure
|
||||
"${TARLZ}" -q -n$i -xf t3_dir.tar.lz --exclude='dir/*' || test_failed $LINENO $i
|
||||
[ ! -e dir ] || test_failed $LINENO $i
|
||||
[ -d dir ] || test_failed $LINENO $i
|
||||
[ ! -e dir/foo ] || test_failed $LINENO $i
|
||||
[ ! -e dir/bar ] || test_failed $LINENO $i
|
||||
[ ! -e dir/baz ] || test_failed $LINENO $i
|
||||
rm -rf dir || framework_failure
|
||||
"${TARLZ}" -q -n$i -xf t3_dir.tar.lz --exclude='[bf][ao][orz]' ||
|
||||
test_failed $LINENO $i
|
||||
[ ! -e dir ] || test_failed $LINENO $i
|
||||
[ -d dir ] || test_failed $LINENO $i
|
||||
[ ! -e dir/foo ] || test_failed $LINENO $i
|
||||
[ ! -e dir/bar ] || test_failed $LINENO $i
|
||||
[ ! -e dir/baz ] || test_failed $LINENO $i
|
||||
rm -rf dir || framework_failure
|
||||
"${TARLZ}" -q -n$i -xf t3_dir.tar.lz --exclude='*o' dir/foo ||
|
||||
test_failed $LINENO $i
|
||||
|
@ -550,9 +590,9 @@ for i in gh1 gh2 gh3 gh4 gh5 gh6 gh7 gh8 sm1 sm2 sm3 sm4 ; do
|
|||
rm -f foo bar baz || framework_failure
|
||||
done
|
||||
done
|
||||
rm -f list3 vlist3 || framework_failure
|
||||
rm -f vlist3 || framework_failure
|
||||
|
||||
# multi-threaded --list succeeds with test_bad2.txt.tar.lz and
|
||||
# multithreaded --list succeeds with test_bad2.txt.tar.lz and
|
||||
# test3_bad3.tar.lz because their headers are intact.
|
||||
"${TARLZ}" -tf "${test_bad2}.tar.lz" > /dev/null || test_failed $LINENO
|
||||
"${TARLZ}" -tf "${t3_bad3_lz}" > /dev/null || test_failed $LINENO
|
||||
|
@ -695,8 +735,27 @@ cp cbaz baz || framework_failure
|
|||
"${TARLZ}" -0 -q -cf aout.tar.lz foo bar aout.tar.lz baz || test_failed $LINENO
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO # test reproducible
|
||||
rm -f aout.tar.lz || framework_failure
|
||||
"${TARLZ}" -0 -cf aout.tar.lz -T list3 || test_failed $LINENO
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO # test reproducible
|
||||
rm -f aout.tar.lz || framework_failure
|
||||
printf "foo\nbar\nbaz\n" | "${TARLZ}" -0 -cf aout.tar.lz -T- || test_failed $LINENO
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO # test reproducible
|
||||
rm -f aout.tar.lz || framework_failure
|
||||
"${TARLZ}" --un -cf out.tar foo bar baz --depth --xdev || test_failed $LINENO
|
||||
"${TARLZ}" --un --par -n3 -cf aout.tar foo bar baz || test_failed $LINENO
|
||||
cmp out.tar aout.tar || test_failed $LINENO # test reproducible
|
||||
rm -f aout.tar || framework_failure
|
||||
"${TARLZ}" --un -cf aout.tar -T list3 || test_failed $LINENO
|
||||
cmp out.tar aout.tar || test_failed $LINENO # test reproducible
|
||||
rm -f aout.tar || framework_failure
|
||||
printf "foo\nbar\nbaz\n" | "${TARLZ}" --un -cf aout.tar -T- || test_failed $LINENO
|
||||
cmp out.tar aout.tar || test_failed $LINENO # test reproducible
|
||||
rm -f aout.tar || framework_failure
|
||||
printf "\nbar\n\n" | "${TARLZ}" --un -cf aout.tar foo -T- baz || test_failed $LINENO
|
||||
cmp out.tar aout.tar || test_failed $LINENO # test reproducible
|
||||
rm -f out.tar aout.tar || framework_failure
|
||||
#
|
||||
"${TARLZ}" -0 -cf aout.tar.lz foo bar baz -C / || test_failed $LINENO
|
||||
"${TARLZ}" -0 -cf aout.tar.lz foo bar baz -C / --mount || test_failed $LINENO
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO
|
||||
rm -f aout.tar.lz || framework_failure
|
||||
"${TARLZ}" -0 -C / -cf aout.tar.lz -C "${objdir}"/tmp foo bar baz ||
|
||||
|
@ -800,7 +859,7 @@ for i in ${safe_dates} '2017-10-01 09:00:00' '2017-10-1 9:0:0' \
|
|||
"${TARLZ}" -xf out.tar || test_failed $LINENO "$i"
|
||||
if [ "${d_works}" = yes ] ; then
|
||||
"${TARLZ}" -df out.tar --ignore-overflow ||
|
||||
{ echo ; "${TARLZ}" -tvf out.tar ; ls -l foo ; test_failed $LINENO "$i" ; }
|
||||
{ "${TARLZ}" -tvf out.tar ; ls -l foo ; test_failed $LINENO "$i" ; echo ; }
|
||||
fi
|
||||
done
|
||||
rm -f out.tar foo bar || framework_failure
|
||||
|
@ -878,24 +937,37 @@ for e in "" .lz ; do
|
|||
"${TARLZ}" -q -f out.tar$e --delete nx_file
|
||||
[ $? = 1 ] || test_failed $LINENO $e
|
||||
cmp t3.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
printf "test.txt\n" | "${TARLZ}" -f out.tar$e --delete -T- || test_failed $LINENO $e
|
||||
cmp t3.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3_dir.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --delete test.txt || test_failed $LINENO $e
|
||||
"${TARLZ}" -f out.tar$e --delete test.txt || test_failed $LINENO $e
|
||||
cmp t3_dir.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3_dir.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --delete dir || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3_dir.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --del dir/foo dir/bar dir/baz || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e > /dev/null && test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --del -R dir || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3_dir.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --del dir/foo dir/baz || test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --del -R dir dir/foo dir/baz || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e > /dev/null && test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --del dir/bar || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3_dir.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --del -R dir || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e > /dev/null && test_failed $LINENO $e
|
||||
"${TARLZ}" -q -f out.tar$e --del dir/baz dir/bar dir/foo || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -f out.tar$e --delete foo bar baz || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -f out.tar$e --delete -T list3 || test_failed $LINENO $e
|
||||
cmp in.tar$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -f out.tar$e --del test.txt foo bar baz || test_failed $LINENO $e
|
||||
cmp eoa$e out.tar$e || test_failed $LINENO $e
|
||||
"${TARLZ}" -A in.tar$e t3.tar$e > out.tar$e || test_failed $LINENO $e
|
||||
|
@ -1016,10 +1088,19 @@ cp cbaz baz || framework_failure
|
|||
"${TARLZ}" -0 -cf aout.tar.lz foo || test_failed $LINENO
|
||||
"${TARLZ}" -0 -rf aout.tar.lz bar baz --no-solid || test_failed $LINENO
|
||||
cmp nout.tar.lz aout.tar.lz || test_failed $LINENO
|
||||
rm -f aout.tar.lz || framework_failure
|
||||
"${TARLZ}" -0 -cf aout.tar.lz foo || test_failed $LINENO
|
||||
printf "bar\n" | "${TARLZ}" -0 -rf aout.tar.lz -T- baz --no-solid ||
|
||||
test_failed $LINENO
|
||||
cmp nout.tar.lz aout.tar.lz || test_failed $LINENO
|
||||
rm -f nout.tar.lz aout.tar.lz || framework_failure
|
||||
touch aout.tar.lz || framework_failure # append to empty file
|
||||
"${TARLZ}" -0 -rf aout.tar.lz foo bar baz || test_failed $LINENO
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO
|
||||
rm -f aout.tar.lz || framework_failure
|
||||
touch aout.tar.lz || framework_failure # append to empty file
|
||||
"${TARLZ}" -0 -rf aout.tar.lz -T list3 || test_failed $LINENO
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO
|
||||
"${TARLZ}" -0 -rf aout.tar.lz || test_failed $LINENO # append nothing
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO
|
||||
"${TARLZ}" -0 -rf aout.tar.lz -C nx_dir || test_failed $LINENO
|
||||
|
@ -1037,7 +1118,7 @@ cmp out.tar.lz aout.tar.lz || test_failed $LINENO
|
|||
cp eoa.lz aout.tar.lz || framework_failure # append to empty archive
|
||||
"${TARLZ}" -0 -rf aout.tar.lz foo bar baz || test_failed $LINENO
|
||||
cmp out.tar.lz aout.tar.lz || test_failed $LINENO
|
||||
rm -f eoa.lz out.tar.lz aout.tar.lz || framework_failure
|
||||
rm -f eoa.lz out.tar.lz aout.tar.lz list3 || framework_failure
|
||||
|
||||
# test --append --uncompressed
|
||||
"${TARLZ}" -cf out.tar foo bar baz || test_failed $LINENO
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue