From c14a376ef6effe089d98e2211cb15e4b66e57fc1 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 23 Aug 2019 23:54:46 -0400 Subject: tests: Bail out of ACL tests if we can't set ACLs Hopefully fixes #52. --- tests.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tests.sh b/tests.sh index 269a5e0..409e1b2 100755 --- a/tests.sh +++ b/tests.sh @@ -2334,16 +2334,14 @@ function test_xtype_bind_mount() { function test_acl() { rm -rf scratch/* - if ! invoke_bfs scratch -quit -acl 2>/dev/null; then - return 0 - fi + invoke_bfs scratch -quit -acl 2>/dev/null || return 0 touch scratch/{normal,acl} if [ "$(uname)" = "Darwin" ]; then - chmod +a "$(id -un) allow read,write" scratch/acl + chmod +a "$(id -un) allow read,write" scratch/acl || return 0 else - setfacl -m "u:$(id -un):rw" scratch/acl + setfacl -m "u:$(id -un):rw" scratch/acl || return 0 fi ln -s acl scratch/link @@ -2354,16 +2352,14 @@ function test_acl() { function test_L_acl() { rm -rf scratch/* - if ! invoke_bfs scratch -quit -acl 2>/dev/null; then - return 0 - fi + invoke_bfs scratch -quit -acl 2>/dev/null || return 0 touch scratch/{normal,acl} if [ "$(uname)" = "Darwin" ]; then - chmod +a "$(id -un) allow read,write" scratch/acl + chmod +a "$(id -un) allow read,write" scratch/acl || return 0 else - setfacl -m "u:$(id -un):rw" scratch/acl + setfacl -m "u:$(id -un):rw" scratch/acl || return 0 fi ln -s acl scratch/link -- cgit v1.2.3