diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-08-23 23:54:46 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-08-23 23:54:46 -0400 |
commit | c14a376ef6effe089d98e2211cb15e4b66e57fc1 (patch) | |
tree | a086b21a1fa94dd8ac27e49c112ed848b64a2e0e /tests.sh | |
parent | 7c474d7e7582d852b20db2d4f868749efc9b62be (diff) | |
download | bfs-c14a376ef6effe089d98e2211cb15e4b66e57fc1.tar.xz |
tests: Bail out of ACL tests if we can't set ACLs
Hopefully fixes #52.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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 |