Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve some hard-link caveats in the manpage.
[rsync/rsync.git]
/
testsuite
/
rsync.fns
diff --git
a/testsuite/rsync.fns
b/testsuite/rsync.fns
index
b58bd0d
..
7ea2a9c
100644
(file)
--- a/
testsuite/rsync.fns
+++ b/
testsuite/rsync.fns
@@
-99,6
+99,10
@@
rsync_ls_lR() {
find "$@" -print | sort | sed 's/ /\\ /g' | xargs "$TOOLDIR/tls" $TLS_ARGS
}
find "$@" -print | sort | sed 's/ /\\ /g' | xargs "$TOOLDIR/tls" $TLS_ARGS
}
+get_testuid() {
+ id 2>/dev/null | sed 's/^[^0-9]*\([0-9][0-9]*\).*/\1/'
+}
+
check_perms() {
perms=`"$TOOLDIR/tls" "$1" | sed 's/^[-d]\(.........\).*/\1/'`
if test $perms = $2; then
check_perms() {
perms=`"$TOOLDIR/tls" "$1" | sed 's/^[-d]\(.........\).*/\1/'`
if test $perms = $2; then
@@
-218,7
+222,7
@@
checkit() {
eval "$1"
status=$?
if [ $status != 0 ]; then
eval "$1"
status=$?
if [ $status != 0 ]; then
- failed="
YES";
+ failed="
$failed status=$status"
fi
echo "-------------"
fi
echo "-------------"
@@
-226,7
+230,7
@@
checkit() {
echo ""
( cd "$2" && rsync_ls_lR . ) > "$tmpdir/ls-from"
( cd "$3" && rsync_ls_lR . ) > "$tmpdir/ls-to"
echo ""
( cd "$2" && rsync_ls_lR . ) > "$tmpdir/ls-from"
( cd "$3" && rsync_ls_lR . ) > "$tmpdir/ls-to"
- diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to" || failed=
YES
+ diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to" || failed=
"$failed dir-diff"
echo "-------------"
echo "check how the files compare with diff:"
echo "-------------"
echo "check how the files compare with diff:"
@@
-234,15
+238,16
@@
checkit() {
if [ "x$4" != x ]; then
echo " === Skipping (as directed) ==="
else
if [ "x$4" != x ]; then
echo " === Skipping (as directed) ==="
else
- diff -r $diffopt "$2" "$3" || failed=
YES
+ diff -r $diffopt "$2" "$3" || failed=
"$failed file-diff"
fi
echo "-------------"
if [ -z "$failed" ] ; then
return 0
fi
echo "-------------"
if [ -z "$failed" ] ; then
return 0
- else
- return 1
fi
fi
+
+ echo "Failed: $failed"
+ return 1
}
}
@@
-258,7
+263,7
@@
build_rsyncd_conf() {
uid_setting='uid = 0'
gid_setting='gid = 0'
uid_setting='uid = 0'
gid_setting='gid = 0'
- case `
id -u
` in
+ case `
get_testuid
` in
0) ;;
*)
# Non-root cannot specify uid & gid settings
0) ;;
*)
# Non-root cannot specify uid & gid settings