Fix xattrs test on OS X.
authorWayne Davison <wayned@samba.org>
Mon, 14 Mar 2011 03:42:58 +0000 (20:42 -0700)
committerWayne Davison <wayned@samba.org>
Mon, 14 Mar 2011 03:48:55 +0000 (20:48 -0700)
testsuite/rsync.fns
testsuite/xattrs.test

index 903bd6ccf5f11ba975fb39a45e4dfaea0fb9f160..fbca1806b08948ff119d30a6c5da466dd48a82d7 100644 (file)
@@ -27,6 +27,7 @@ chkdir="$tmpdir/chk"
 all_plus='+++++++++'
 allspace='         '
 dots='.....' # trailing dots after changes
+tab_ch='       ' # a single tab character
 
 # Berkley's nice.
 PATH="$PATH:/usr/ucb"
index b61f56138d215715467463edb77bf1aea73d87dc..97056b7f5022c57128ac1a66503d03ccec218b7e 100644 (file)
@@ -18,8 +18,9 @@ case "`xattr 2>&1`" in
        xattr -s "$xnam" "$xval" "${@}"
     }
     xls() {
-       xattr -l "${@}"
+       xattr -l "${@}" | sed "s/^[ $tab_ch]*//"
     }
+    RSYNC_PREFIX='rsync'
     RUSR='rsync.nonuser'
     ;;
 *)
@@ -32,6 +33,7 @@ case "`xattr 2>&1`" in
     xls() {
        getfattr -d "${@}"
     }
+    RSYNC_PREFIX='user.rsync'
     RUSR='user.rsync'
     ;;
 esac
@@ -125,8 +127,8 @@ cd "$chkdir"
 chmod go-rwx . $dirs $files
 
 xset user.nice 'this is nice, but different' file1
-xset user.rsync.%stat "40000 0,0 $uid_gid" $dirs
-xset user.rsync.%stat "100000 0,0 $uid_gid" $files
+xset $RSYNC_PREFIX.%stat "40000 0,0 $uid_gid" $dirs
+xset $RSYNC_PREFIX.%stat "100000 0,0 $uid_gid" $files
 
 xls $dirs $files >"$scratchdir/xattrs.txt"