2 # copy files/directories across file system boundaries
3 # and make sure acls are preserved appropriately
6 # Make sure we get English translations.
7 . $srcdir/../lang-default
9 if test "$VERBOSE" = yes; then
17 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
18 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
19 trap '(exit $?); exit $?' 1 2 13 15
22 mkdir -p $tmp || framework_failure=1
23 cd $tmp || framework_failure=1
25 mkdir -p a b || framework_failure=1
26 touch a/file || framework_failure=1
28 if test $framework_failure = 1; then
29 echo 'failure in testing framework'
34 # Ensure that setfacl and getfacl work on this file system.
35 setfacl -m user:bin:rw a/file 2> /dev/null || skip=yes
36 acl1=`cd a && getfacl file | grep -v ':bin:' | grep -v 'mask::'` \
41 echo "$0: '.' is not on a suitable file system for this test" 1>&2
42 echo "$0: skipping this test" 1>&2
46 # copy a file without preserving permissions
47 cp a/file b/ || fail=1
49 acl2=`cd b && getfacl file` || framework_failure=1
50 test "$acl1" = "$acl2" || fail=1
51 rm a/file || framework_failure=1
53 # copy a file, preserving permissions
54 touch a/file || framework_failure=1
55 setfacl -m user:bin:rw a/file || framework_failure=1
56 acl1=`cd a && getfacl file` || framework_failure=1
57 cp -p a/file b/ || fail=1
58 acl2=`cd b && getfacl file` || framework_failure=1
59 test "$acl1" = "$acl2" || fail=1
61 if test $framework_failure = 1; then
62 echo 'failure in testing framework'