From 6c563e370d0f2f3cf36f3b274e8fe1392ca7125f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 22 Oct 2015 01:07:13 +0200 Subject: tar: add support for --strip-components=N function old new delta data_extract_all 882 995 +113 tar_longopts 290 309 +19 tar_main 938 942 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 136/0) Total: 136 bytes Signed-off-by: Denys Vlasenko --- testsuite/tar.tests | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testsuite') 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 $? "" "" SKIP= +# "tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input": +# GNU tar 1.26 records as hardlinks: +# input_hard2 -> input_hard1 +# input_hard1 -> input_hard1 (!!!) +# input_dir/file -> input_dir/file +# input -> input +# As of 1.24.0, we don't record last two: for them, nlink==1 +# and we check for "hardlink"ness only files with nlink!=1 +# We also don't use "hrw-r--r--" notation for hardlinks in "tar tv" listing. optional FEATURE_TAR_CREATE FEATURE_LS_SORTFILES testing "tar hardlinks and repeated files" '\ rm -rf input_* test.tar 2>/dev/null @@ -64,6 +73,7 @@ chmod -R 644 * chmod 755 input_dir tar cf test.tar input input_dir/ input_hard1 input_hard2 input_hard1 input_dir/ input tar tvf test.tar | sed "s/.*[0-9] input/input/" +rm -rf input_dir tar xf test.tar 2>&1 echo Ok: $? ls -l . input_dir/* | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/" -- cgit v1.2.3