X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/45d41d08bdaaaa48c9f92c1e9157faafb277a92d..c82711b34e7d24f4d386c61b9e45ac2163a58936:/testsuite/chmod-option.test diff --git a/testsuite/chmod-option.test b/testsuite/chmod-option.test index 2813ff2f..81fd38c7 100644 --- a/testsuite/chmod-option.test +++ b/testsuite/chmod-option.test @@ -7,9 +7,7 @@ # Test that the --chmod option functions correctly. -. $srcdir/testsuite/rsync.fns - -set -x +. $suitedir/rsync.fns # Build some files @@ -31,14 +29,43 @@ chmod 700 "$dir1" chmod 770 "$dir2" # Copy the files we've created over to another directory -checkit "$RSYNC -avv \"$fromdir/\" \"$checkdir/\"" "$fromdir" "$checkdir" +checkit "$RSYNC -avv '$fromdir/' '$checkdir/'" "$fromdir" "$checkdir" # And then manually make the changes which should occur umask 002 chmod ug-s,a+rX "$checkdir"/* chmod +w "$checkdir" "$checkdir"/dir* -checkit "$RSYNC -avv --chmod ug-s,a+rX,D+w \"$fromdir/\" \"$todir/\"" "$checkdir" "$todir" +checkit "$RSYNC -avv --chmod ug-s,a+rX,D+w '$fromdir/' '$todir/'" "$checkdir" "$todir" + +rm -r "$fromdir" "$checkdir" "$todir" +makepath "$todir" "$fromdir/foo" +touch "$fromdir/bar" + +checkit "$RSYNC -avv '$fromdir/' '$checkdir/'" "$fromdir" "$checkdir" +chmod o+x "$fromdir"/bar + +checkit "$RSYNC -avv --chmod=Fo-x '$fromdir/' '$todir/'" "$checkdir" "$todir" + +# Tickle a bug in rsync 2.6.8: if you push a new directory with --perms off to +# a daemon with an incoming chmod, the daemon pretends the directory is a file +# for the purposes of the second application of the incoming chmod. + +build_rsyncd_conf +cat >>"$scratchdir/test-rsyncd.conf" <