Fixed a couple of failing tar tests
authorDan Fandrich <dan@coneharvesters.com>
Sat, 11 Sep 2010 07:28:50 +0000 (00:28 -0700)
committerDenys Vlasenko <dvlasenk@redhat.com>
Sun, 12 Sep 2010 14:19:33 +0000 (16:19 +0200)
The tar symlinks mode test is fixed similarly to the hardlinks
test in 0d7cb4cc, and the read-only test is skipped by
SKIP_KNOWN_BUGS.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
testsuite/tar.tests

index dd502c23df188746f826bef67057cf2ff64d8da1..f2f4e93483996e8ba614417b9c981aef4c6ea88e 100755 (executable)
@@ -91,15 +91,14 @@ mkdir input_dir
 ln input_file input_dir
 ln input_soft input_dir
 chmod 550 input_dir
-tar cf test.tar input_*
+tar cf test.tar input_dir/* input_[fs]*
 tar tvf test.tar | sed "s/.*[0-9] input/input/" | sort
 chmod 770 input_dir
 rm -rf input_*
 tar xf test.tar 2>&1
 echo Ok: $?
-ls -l . input_dir/* | grep input_ | sed "s/\\(^[^ ]*\\) .* input/\\1 input/"
+ls -l . input_dir/* | grep "input_[fs]" | sed "s/\\(^[^ ]*\\) .* input/\\1 input/"
 ' "\
-input_dir/
 input_dir/input_file
 input_dir/input_soft -> input_file
 input_file -> input_dir/input_file
@@ -107,7 +106,6 @@ input_soft -> input_dir/input_soft
 Ok: 0
 -rwxr----x input_dir/input_file
 lrwxrwxrwx input_file
-dr-xr-x--- input_dir
 -rwxr----x input_file
 lrwxrwxrwx input_file
 " \
@@ -129,6 +127,7 @@ Ok
 "Ok\n" ""
 SKIP=
 
+test x"$SKIP_KNOWN_BUGS" = x"" && {
 # Needs to be run under non-root for meaningful test
 optional FEATURE_TAR_CREATE
 testing "tar writing into read-only dir" '\
@@ -153,6 +152,8 @@ dr-xr-x--- input_dir
 " \
 "" ""
 SKIP=
+}
+
 
 cd .. && rm -rf tar.tempdir || exit 1