mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-27 10:41:47 -04:00
- use `grep -E` and `grep -F` (`egrep` and `fgrep` are non-standard) - use same hashbang style for all test scripts - use explicit comparisons in test scripts - remove redundant ; from test scripts - make test script not executable, just like all the other scripts - unify codestyle across all test scripts - make openssl license exception clearer by having it at the top - use modern links in COPYING. The text now matches: https://www.gnu.org/licenses/gpl-3.0.txt - fix typo
31 lines
961 B
Bash
31 lines
961 B
Bash
#!/bin/sh
|
|
|
|
# Copyright (C) 2004-2020 Wayne Davison
|
|
|
|
# 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"
|
|
|
|
hands_setup
|
|
|
|
chmod 440 "$fromdir/text"
|
|
chmod 500 "$fromdir/dir/text"
|
|
e="$fromdir/dir/subdir/foobar.baz"
|
|
chmod 6450 "$e" || chmod 2450 "$e" || chmod 1450 "$e" || chmod 450 "$e"
|
|
e="$fromdir/dir/subdir/subsubdir/etc-ltr-list"
|
|
chmod 2670 "$e" || chmod 1670 "$e" || chmod 670 "$e"
|
|
|
|
# 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
|