diff options
Diffstat (limited to 'testsuite/tar.tests')
-rwxr-xr-x | testsuite/tar.tests | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tar.tests b/testsuite/tar.tests index 4929f4e49..383a4646c 100755 --- a/testsuite/tar.tests +++ b/testsuite/tar.tests | |||
@@ -53,6 +53,15 @@ dd if=/dev/zero bs=512 count=20 2>/dev/null | tar xvf - 2>&1; echo $? | |||
53 | "" "" | 53 | "" "" |
54 | SKIP= | 54 | SKIP= |
55 | 55 | ||
56 | # "tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input": | ||
57 | # GNU tar 1.26 records as hardlinks: | ||
58 | # input_hard2 -> input_hard1 | ||
59 | # input_hard1 -> input_hard1 (!!!) | ||
60 | # input_dir/file -> input_dir/file | ||
61 | # input -> input | ||
62 | # As of 1.24.0, we don't record last two: for them, nlink==1 | ||
63 | # and we check for "hardlink"ness only files with nlink!=1 | ||
64 | # We also don't use "hrw-r--r--" notation for hardlinks in "tar tv" listing. | ||
56 | optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES | 65 | optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES |
57 | testing "tar hardlinks and repeated files" '\ | 66 | testing "tar hardlinks and repeated files" '\ |
58 | rm -rf input_* test.tar 2>/dev/null | 67 | rm -rf input_* test.tar 2>/dev/null |
@@ -64,6 +73,7 @@ chmod -R 644 * | |||
64 | chmod 755 input_dir | 73 | chmod 755 input_dir |
65 | tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input | 74 | tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input |
66 | tar tvf test.tar | sed "s/.*[0-9] input/input/" | 75 | tar tvf test.tar | sed "s/.*[0-9] input/input/" |
76 | rm -rf input_dir | ||
67 | tar xf test.tar 2>&1 | 77 | tar xf test.tar 2>&1 |
68 | echo Ok: $? | 78 | echo Ok: $? |
69 | ls -l . input_dir/* | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/" | 79 | ls -l . input_dir/* | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/" |