Changed some instances of \" in checkit calls to '.
[rsync/rsync.git] / testsuite / chmod-temp-dir.test
CommitLineData
6558854d
WD
1#! /bin/sh
2
3# Copyright (C) 2004 by Wayne Davison <wayned@samba.org>
4
c8d19f90 5# This program is distributable under the terms of the GNU GPL (see
6558854d
WD
6# COPYING).
7
8# Test that various read-only and set[ug]id permissions work properly,
9# even when using a --temp-dir option (which we try to point at a
10# different filesystem than the destination dir).
11
12. "$suitedir/rsync.fns"
13
6558854d
WD
14hands_setup
15
16tmpdir2=/tmp
17sdev=`$TOOLDIR/getfsdev $scratchdir`
18tdev=`$TOOLDIR/getfsdev $tmpdir2`
19if [ x$sdev = x$tdev ]; then
20 tmpdir2=/var/tmp
21 tdev=`$TOOLDIR/getfsdev $tmpdir2`
22 [ x$sdev = x$tdev ] && test_skipped "Can't find a tmp dir on a different file system"
23fi
24
25chmod 440 "$fromdir/text"
26chmod 500 "$fromdir/dir/text"
d66d07e8
WD
27e="$fromdir/dir/subdir/foobar.baz"
28chmod 6450 "$e" || chmod 2450 "$e" || chmod 1450 "$e" || chmod 450 "$e"
29e="$fromdir/dir/subdir/subsubdir/etc-ltr-list"
30chmod 2670 "$e" || chmod 1670 "$e" || chmod 670 "$e"
6558854d 31
d66d07e8 32# First a normal copy.
6558854d
WD
33runtest "normal copy" 'checkit "$RSYNC -avv --temp-dir=\"$tmpdir2\" \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
34
d66d07e8 35# Then we update all the files.
6558854d
WD
36runtest "update copy" 'checkit "$RSYNC -avvI --no-whole-file --temp-dir=\"$tmpdir2\" \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
37
38# The script would have aborted on error, so getting here means we've won.
39exit 0