summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/existing-perm-race4
-rwxr-xr-xtests/cp/perm8
-rwxr-xr-xtests/cp/preserve-gid21
3 files changed, 26 insertions, 7 deletions
diff --git a/tests/cp/existing-perm-race b/tests/cp/existing-perm-race
index f048eb160..d5774404e 100755
--- a/tests/cp/existing-perm-race
+++ b/tests/cp/existing-perm-race
@@ -71,8 +71,8 @@ case $mode in
# a $g2 process can maintain an open file descriptor to the
# destination, but it's safer anyway.
-rw-r-----*)
- # If the file has group $g1 and is group-readable, that is definitely
- # bogus, as neither the source nor the destination was readable to group $g1.
+ # If the file has group $g1 and is group-readable, that is definitely bogus,
+ # as neither the source nor the destination was readable to group $g1.
test "$group" = "$g1" && fail=1;;
*) fail=1;;
diff --git a/tests/cp/perm b/tests/cp/perm
index e5fdb098d..663ad4dfa 100755
--- a/tests/cp/perm
+++ b/tests/cp/perm
@@ -55,9 +55,13 @@ for u in 31 37 2; do
;;
cp:*:no)
test $u = 37 &&
- expected_perms=`echo $expected_perms|sed 's/.....$/-----/'`
+ expected_perms=`
+ echo $expected_perms | sed 's/.....$/-----/'
+ `
test $u = 31 &&
- expected_perms=`echo $expected_perms|sed 's/..\(..\).$/--\1-/'`
+ expected_perms=`
+ echo $expected_perms | sed 's/..\(..\).$/--\1-/'
+ `
;;
esac
test _$actual_perms = _$expected_perms || exit 1
diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid
index a25cbb478..b0497841d 100755
--- a/tests/cp/preserve-gid
+++ b/tests/cp/preserve-gid
@@ -60,9 +60,24 @@ t1() {
"$nameless_uid" "$@"
}
-nameless_uid=`$PERL -le 'foreach my $i (1000..16*1024-1) { getpwuid $i or (print $i), exit }'`
-nameless_gid1=`$PERL -le 'foreach my $i (1000..16*1024) { getgrgid $i or (print $i), exit }'`
-nameless_gid2=`$PERL -le 'foreach my $i ('"$nameless_gid1"'+1..16*1024) { getgrgid $i or (print $i), exit }'`
+nameless_uid=`$PERL -le '
+ foreach my $i (1000..16*1024-1)
+ {
+ getpwuid $i or (print $i), exit
+ }
+'`
+nameless_gid1=`$PERL -le '
+ foreach my $i (1000..16*1024)
+ {
+ getgrgid $i or (print $i), exit
+ }
+'`
+nameless_gid2=`$PERL -le '
+ foreach my $i ('"$nameless_gid1"'+1..16*1024)
+ {
+ getgrgid $i or (print $i), exit
+ }
+'`
if test -z "$nameless_uid" \
|| test -z "$nameless_gid1" \