version 1.1.1.2, 2013/10/14 07:51:15
|
version 1.1.1.3, 2021/03/17 00:32:36
|
Line 8
|
Line 8
|
. $suitedir/rsync.fns |
. $suitedir/rsync.fns |
lnkdir="$tmpdir/lnk" |
lnkdir="$tmpdir/lnk" |
|
|
$RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync is configured without xattr support" | $RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync is configured without xattr support" |
|
|
case "$HOST_OS" in |
case "$HOST_OS" in |
darwin*) |
darwin*) |
Line 45 EOF
|
Line 45 EOF
|
RSYNC_PREFIX='rsync' |
RSYNC_PREFIX='rsync' |
RUSR='rsync.nonuser' |
RUSR='rsync.nonuser' |
;; |
;; |
|
freebsd*) |
|
xset() { |
|
xnam="$1" |
|
xval="$2" |
|
shift 2 |
|
setextattr -h user "$xnam" "$xval" "${@}" |
|
} |
|
xls() { |
|
for f in "${@}"; do lsextattr -q -h user "$f" | tr '[[:space:]]' '\n' | sort | xargs -I % getextattr -h user % "$f"; done |
|
} |
|
RSYNC_PREFIX='rsync' |
|
RUSR='rsync' |
|
;; |
*) |
*) |
xset() { |
xset() { |
xnam="$1" |
xnam="$1" |
Line 127 esac
|
Line 140 esac
|
|
|
xls $dirs $files >"$scratchdir/xattrs.txt" |
xls $dirs $files >"$scratchdir/xattrs.txt" |
|
|
|
XFILT='-f-x_system.* -f-x_security.*' |
|
|
# OK, let's try a simple xattr copy. |
# OK, let's try a simple xattr copy. |
checkit "$RSYNC -avX $dashH --super . '$chkdir/'" "$fromdir" "$chkdir" | checkit "$RSYNC -avX $XFILT $dashH --super . '$chkdir/'" "$fromdir" "$chkdir" |
|
|
cd "$chkdir" |
cd "$chkdir" |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
Line 142 if [ "$dashH" ]; then
|
Line 157 if [ "$dashH" ]; then
|
done |
done |
fi |
fi |
|
|
checkit "$RSYNC -aiX $dashH --super $altDest=../chk . ../to" "$fromdir" "$todir" | checkit "$RSYNC -aiX $XFILT $dashH --super $altDest=../chk . ../to" "$fromdir" "$todir" |
|
|
cd "$todir" |
cd "$todir" |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
Line 156 xset user.nice 'this is nice, but different' file1
|
Line 171 xset user.nice 'this is nice, but different' file1
|
|
|
xls $dirs $files >"$scratchdir/xattrs.txt" |
xls $dirs $files >"$scratchdir/xattrs.txt" |
|
|
checkit "$RSYNC -aiX $dashH --fake-super --link-dest=../chk . ../to" "$chkdir" "$todir" | checkit "$RSYNC -aiX $XFILT $dashH --fake-super --link-dest=../chk . ../to" "$chkdir" "$todir" |
|
|
cd "$todir" |
cd "$todir" |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
|
|
sed -n -e '/^[^ ][^ ]* *[^ ][^ ]* *[^ ][^ ]* *1 /p' "$scratchdir/ls-to" >"$scratchdir/ls-diff-all" | sed -n -e '/^[^d ][^ ]* *[^ ][^ ]* *[^ ][^ ]* *1 /p' "$scratchdir/ls-to" >"$scratchdir/ls-diff-all" |
fgrep -v './file1' "$scratchdir/ls-diff-all" >"$scratchdir/ls-diff" || : |
fgrep -v './file1' "$scratchdir/ls-diff-all" >"$scratchdir/ls-diff" || : |
if [ -s "$scratchdir/ls-diff" ]; then |
if [ -s "$scratchdir/ls-diff" ]; then |
echo "Missing hard links on:" |
echo "Missing hard links on:" |
Line 186 cd "$fromdir"
|
Line 201 cd "$fromdir"
|
rm -rf "$todir" |
rm -rf "$todir" |
|
|
# When run by a non-root tester, this checks if no-user-perm files/dirs can be copied. |
# When run by a non-root tester, this checks if no-user-perm files/dirs can be copied. |
checkit "$RSYNC -aiX $dashH --fake-super --chmod=a= . ../to" "$chkdir" "$todir" # 2>"$scratchdir/errors.txt" | checkit "$RSYNC -aiX $XFILT $dashH --fake-super --chmod=a= . ../to" "$chkdir" "$todir" # 2>"$scratchdir/errors.txt" |
|
|
cd "$todir" |
cd "$todir" |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" - |
Line 202 $RSYNC -aX file1 ../lnk/
|
Line 217 $RSYNC -aX file1 ../lnk/
|
|
|
xls file1 file2 >"$scratchdir/xattrs.txt" |
xls file1 file2 >"$scratchdir/xattrs.txt" |
|
|
checkit "$RSYNC -aiiX $dashH $altDest=../lnk . ../to" "$chkdir" "$todir" | checkit "$RSYNC -aiiX $XFILT $dashH $altDest=../lnk . ../to" "$chkdir" "$todir" |
|
|
[ "$dashH" ] && rm ../lnk/extra-link |
[ "$dashH" ] && rm ../lnk/extra-link |
|
|
Line 215 rm "$todir/file2"
|
Line 230 rm "$todir/file2"
|
echo extra >file1 |
echo extra >file1 |
$RSYNC -aX . ../chk/ |
$RSYNC -aX . ../chk/ |
|
|
checkit "$RSYNC -aiiX . ../to" "$chkdir" "$todir" | checkit "$RSYNC -aiiX $XFILT . ../to" "$chkdir" "$todir" |
|
|
cd "$todir" |
cd "$todir" |
xls file1 file2 | diff $diffopt "$scratchdir/xattrs.txt" - |
xls file1 file2 | diff $diffopt "$scratchdir/xattrs.txt" - |