]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
authorJim Meyering <jim@meyering.net>
Wed, 16 Aug 2006 21:53:56 +0000 (21:53 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 16 Aug 2006 21:53:56 +0000 (21:53 +0000)
* tests/cp/acl: Instead, skip the test if either setfacl
or getfacl fails.

ChangeLog
tests/cp/Makefile.am
tests/cp/acl

index 326c49292218244c650cfaa2c9e1f61df9887ef5..90503d8161982ea97e2d9685c9c549bd0cb6390c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-16  Jim Meyering  <jim@meyering.net>
+
+       * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
+       * tests/cp/acl: Instead, skip the test if either setfacl
+       or getfacl fails.
+       Reported by Michael Stone.
+
 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        * tests/ls-2/tests: Skip this test suite if we can't set up files
index 5fa40e4bbe3334d98a806838c22c95de29b7606d..acbb22df9463eb8130969874c3335fde0d692b17 100644 (file)
@@ -1,7 +1,6 @@
 ## Process this file with automake to produce Makefile.in -*-Makefile-*-.
 AUTOMAKE_OPTIONS = 1.1 gnits
 
-XFAIL_TESTS = acl
 TESTS = \
   link-no-deref \
   cp-deref \
index 8abb6c1c3381004161004bad651f65834c67bc69..3c727473252a146e5c543ac8b5f9eb1e4386fe56 100755 (executable)
@@ -19,20 +19,33 @@ trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
 trap '(exit $?); exit $?' 1 2 13 15
 
 framework_failure=0
-mkdir -p $tmp/a $tmp/b || framework_failure=1
+mkdir -p $tmp || framework_failure=1
 cd $tmp || framework_failure=1
 
+mkdir -p a b || framework_failure=1
+touch a/file || framework_failure=1
+
 if test $framework_failure = 1; then
   echo 'failure in testing framework'
   (exit 1); exit 1
 fi
 
-# copy a file without preserving permissions
-touch a/file || framework_failure=1
-setfacl -m user:bin:rw a/file || framework_failure=1
+skip=no
+# Ensure that setfacl and getfacl work on this file system.
+setfacl -m user:bin:rw a/file 2> /dev/null || skip=yes
 acl1=`cd a && getfacl file | grep -v ':bin:' | grep -v 'mask::'` \
-  || framework_failure=1
+  || skip=yes
+
+test $skip = yes &&
+  {
+    echo "$0: '.' is not on a suitable file system for this test" 1>&2
+    echo "$0: skipping this test" 1>&2
+    (exit 77); exit 77
+  }
+
+# copy a file without preserving permissions
 cp a/file b/ || fail=1
+
 acl2=`cd b && getfacl file` || framework_failure=1
 test "$acl1" = "$acl2" || fail=1
 rm a/file || framework_failure=1