summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-06-21 14:42:43 -0700
committerJunio C Hamano <gitster@pobox.com>2012-06-21 14:42:44 -0700
commit2a6291e97a219e660ae7c75f44a55f8c2a331c40 (patch)
treeb521f4e698a226b4c22a4f749636420faf0cc2a7 /t
parenta88d7aaee8f8b80fdd2b70d38beb534b5102ee7c (diff)
parenta14ad109115b29483b6e37d18159d850e2752c72 (diff)
downloadgit-2a6291e97a219e660ae7c75f44a55f8c2a331c40.tar.gz
Merge branch 'jk/maint-t1304-setfacl'
Works around a false test failure caused by a bug in ecryptofs. * jk/maint-t1304-setfacl: t1304: improve setfacl prerequisite setup
Diffstat (limited to 't')
-rwxr-xr-xt/t1304-default-acl.sh19
1 files changed, 9 insertions, 10 deletions
diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
index 2b962cfda7..79045abb51 100755
--- a/t/t1304-default-acl.sh
+++ b/t/t1304-default-acl.sh
@@ -14,16 +14,15 @@ umask 077
# We need an arbitrary other user give permission to using ACLs. root
# is a good candidate: exists on all unices, and it has permission
# anyway, so we don't create a security hole running the testsuite.
-
-setfacl_out="$(setfacl -m u:root:rwx . 2>&1)"
-setfacl_ret=$?
-
-if test $setfacl_ret != 0
-then
- say "Unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
-else
- test_set_prereq SETFACL
-fi
+test_expect_success 'checking for a working acl setup' '
+ if setfacl -m d:m:rwx -m u:root:rwx . &&
+ getfacl . | grep user:root:rwx &&
+ touch should-have-readable-acl &&
+ getfacl should-have-readable-acl | egrep "mask::?rw-"
+ then
+ test_set_prereq SETFACL
+ fi
+'
if test -z "$LOGNAME"
then