diff options
author | Wayne Davison <wayned@samba.org> | 2004-08-09 20:52:35 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2004-08-09 20:52:35 +0000 |
commit | 6558854dbe14f62cb3713da897b55b9dbaac43eb (patch) | |
tree | 67fd92aa135ca8e4e112586184f5aa3f7a6af421 /testsuite/chmod.test | |
parent | 7d9d5d9478639b9d9a22cff432f6c35c14c35120 (diff) | |
download | rsync-6558854dbe14f62cb3713da897b55b9dbaac43eb.tar.gz |
Do some simple tests with various read-only and set[ug]id files.
Diffstat (limited to 'testsuite/chmod.test')
-rw-r--r-- | testsuite/chmod.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/chmod.test b/testsuite/chmod.test new file mode 100644 index 00000000..ce46b9f0 --- /dev/null +++ b/testsuite/chmod.test @@ -0,0 +1,30 @@ +#! /bin/sh + +# Copyright (C) 2004 by Wayne Davison <wayned@samba.org> + +# This program is distributable under the terms of the GNU GPL see +# COPYING). + +# Test that various read-only and set[ug]id permissions work properly, +# even when using a --temp-dir option (which we try to point at a +# different filesystem than the destination dir). + +. "$suitedir/rsync.fns" + +set -x + +hands_setup + +chmod 440 "$fromdir/text" +chmod 500 "$fromdir/dir/text" +chmod 6450 "$fromdir/dir/subdir/foobar.baz" +chmod 2670 "$fromdir/dir/subdir/subsubdir/etc-ltr-list" + +# First a normal copy. +runtest "normal copy" 'checkit "$RSYNC -avv \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"' + +# Then we update all the files. +runtest "update copy" 'checkit "$RSYNC -avvI --no-whole-file \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"' + +# The script would have aborted on error, so getting here means we've won. +exit 0 |