diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-10-14 15:18:34 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-10-14 15:23:14 +0100 |
commit | f9fb9acb0da91b40a2ba1a0bb93b4c3c72ed7aa6 (patch) | |
tree | 088904d3a7c22aa07e43ee837ce93d148eb23311 /init.cfg | |
parent | e6b3af647dd5611489b858a3fe14f0e3b1056ce2 (diff) | |
download | coreutils-f9fb9acb0da91b40a2ba1a0bb93b4c3c72ed7aa6.tar.xz |
tests: avoid false failures with default ACLs
To reproduce:
setfacl -dm group::rx .
setfacl -dm other::rx .
make check
* init.cfg (require_no_default_acl_): A new function to skip
when default ACLs are detected, or if the getfacl utility is
not available then skip if any non LSM ACLs detected.
* tests/cp/existing-perm-race.sh: Call require_no_default_acl_.
* tests/mkdir/parents.sh: Likewise.
* tests/mkdir/perm.sh: Likewise.
Diffstat (limited to 'init.cfg')
-rw-r--r-- | init.cfg | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -60,6 +60,15 @@ getlimits_() test "$INT_MAX" || fatal_ "running getlimits" } +require_no_default_acl_() +{ + if getfacl --version < /dev/null > /dev/null 2>&1; then + getfacl "$1" | grep '^default:' && skip_ 'Default ACL detected' + else + ls -ld "$1" | grep '.........+' && skip_ 'ACL detected' + fi +} + require_acl_() { getfacl --version < /dev/null > /dev/null 2>&1 \ |