summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-08-23 23:54:46 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-08-23 23:54:46 -0400
commitc14a376ef6effe089d98e2211cb15e4b66e57fc1 (patch)
treea086b21a1fa94dd8ac27e49c112ed848b64a2e0e /tests.sh
parent7c474d7e7582d852b20db2d4f868749efc9b62be (diff)
downloadbfs-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-xtests.sh16
1 files 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