diff options
author | Wayne Davison <wayne@opencoder.net> | 2020-07-13 15:33:07 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2020-07-13 15:33:07 -0700 |
commit | 4c0be4da13d13bdac1b28bf60a388c02fb8ce9cf (patch) | |
tree | 88a8bb309df5b0526bd09c8b4d7e82a0be0361ad /testsuite/dir-sgid.test | |
parent | 45498551260467c3ffdbaa7455e546827abedd84 (diff) | |
download | rsync-4c0be4da13d13bdac1b28bf60a388c02fb8ce9cf.tar.gz |
Avoid a failed test on Cygwin.
Diffstat (limited to 'testsuite/dir-sgid.test')
-rw-r--r-- | testsuite/dir-sgid.test | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/testsuite/dir-sgid.test b/testsuite/dir-sgid.test index 44cd61e7..dadc5507 100644 --- a/testsuite/dir-sgid.test +++ b/testsuite/dir-sgid.test @@ -23,12 +23,19 @@ testit() { check_perms "$todir/to/program" $4 "Target $1" } +mkdir "$scratchdir/dir" +# Cygwin has a persistent default dir ACL that ruins this test. +case `getfacl "$scratchdir/dir" 2>/dev/null || true` in +*default:user::*) test_skipped "The default ACL mode interferes with this test" ;; +esac + echo "File!" >"$scratchdir/file" echo "#!/bin/sh" >"$scratchdir/program" -mkdir "$scratchdir/dir" + chmod u=rwx,g=rw,g+s,o=r "$scratchdir/dir" || test_skipped "Can't chmod" chmod 664 "$scratchdir/file" chmod 775 "$scratchdir/program" + [ -g "$scratchdir/dir" ] || test_skipped "The directory setgid bit vanished!" mkdir "$scratchdir/dir/blah" [ -g "$scratchdir/dir/blah" ] || test_skipped "Your filesystem doesn't use directory setgid; maybe it's BSD." |