aboutsummaryrefslogtreecommitdiff
path: root/t/t1304-default-acl.sh
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2010-03-15 12:14:35 -0500
committerJunio C Hamano <gitster@pobox.com>2010-03-16 19:05:58 -0700
commit71c4d6c6354036597534931d8fe9e80a9ae3c0af (patch)
treec627b0fdf6fe2647649a49531900c4f89d84a169 /t/t1304-default-acl.sh
parentab04a9056788cf77f6b6c72605fc6027f21d9d7c (diff)
downloadgit-71c4d6c6354036597534931d8fe9e80a9ae3c0af.tar.gz
git-71c4d6c6354036597534931d8fe9e80a9ae3c0af.tar.xz
t/t1304: use 'test -r' to test readability rather than looking at mode bits
This test was using the group read permission bit as an indicator of the default ACL mask. This behavior is valid on Linux but not on other platforms like Solaris. So, rather than looking at mode bits, just test readability for the user. This, along with the checks for the existence of the ACL's that were set on the parent directories, should be enough. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1304-default-acl.sh')
-rwxr-xr-xt/t1304-default-acl.sh15
1 files changed, 1 insertions, 14 deletions
diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
index 3a1532be5..52246d739 100755
--- a/t/t1304-default-acl.sh
+++ b/t/t1304-default-acl.sh
@@ -20,21 +20,8 @@ if ! setfacl -m u:root:rwx .; then
test_done
fi
-modebits () {
- ls -l "$1" | sed -e 's|^\(..........\).*|\1|'
-}
-
check_perms_and_acl () {
- actual=$(modebits "$1") &&
- case "$actual" in
- -r--r-----*)
- : happy
- ;;
- *)
- echo "Got permission '$actual', expected '-r--r-----'"
- false
- ;;
- esac &&
+ test -r "$1" &&
getfacl "$1" > actual &&
grep -q "user:root:rwx" actual &&
grep -q "user:${LOGNAME}:rwx" actual &&