diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/tar.tests | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tar.tests b/testsuite/tar.tests index c947d3382..93ba5f004 100755 --- a/testsuite/tar.tests +++ b/testsuite/tar.tests | |||
@@ -15,6 +15,15 @@ mkdir tar.tempdir && cd tar.tempdir || exit 1 | |||
15 | 15 | ||
16 | # testing "test name" "script" "expected result" "file input" "stdin" | 16 | # testing "test name" "script" "expected result" "file input" "stdin" |
17 | 17 | ||
18 | testing "Empty file is not a tarball" '\ | ||
19 | tar xvf - 2>&1; echo $? | ||
20 | ' "\ | ||
21 | tar: short read | ||
22 | 1 | ||
23 | " \ | ||
24 | "" "" | ||
25 | SKIP= | ||
26 | |||
18 | optional FEATURE_SEAMLESS_GZ | 27 | optional FEATURE_SEAMLESS_GZ |
19 | testing "Empty file is not a tarball.tar.gz" '\ | 28 | testing "Empty file is not a tarball.tar.gz" '\ |
20 | tar xvzf - 2>&1; echo $? | 29 | tar xvzf - 2>&1; echo $? |
@@ -26,6 +35,22 @@ tar: short read | |||
26 | "" "" | 35 | "" "" |
27 | SKIP= | 36 | SKIP= |
28 | 37 | ||
38 | testing "Two zeroed blocks is a ('truncated') empty tarball" '\ | ||
39 | dd if=/dev/zero bs=512 count=2 2>/dev/null | strace -o /tmp/zzz -tt -s99 tar xvf - 2>&1; echo $? | ||
40 | ' "\ | ||
41 | 0 | ||
42 | " \ | ||
43 | "" "" | ||
44 | SKIP= | ||
45 | |||
46 | testing "Twenty zeroed blocks is an empty tarball" '\ | ||
47 | dd if=/dev/zero bs=512 count=20 2>/dev/null | tar xvf - 2>&1; echo $? | ||
48 | ' "\ | ||
49 | 0 | ||
50 | " \ | ||
51 | "" "" | ||
52 | SKIP= | ||
53 | |||
29 | optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES | 54 | optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES |
30 | testing "tar hardlinks and repeated files" '\ | 55 | testing "tar hardlinks and repeated files" '\ |
31 | rm -rf input_* test.tar 2>/dev/null | 56 | rm -rf input_* test.tar 2>/dev/null |