summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-01-14 16:17:53 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-01-14 16:17:53 -0500
commitea70127c6dc8c0e6321bcf42d18fd9f229bc1642 (patch)
treebbe27598a5070018fa50edb0f415e0ea181b5fb7
parentd6a8ad44c3716281f5ba5a395c91dfee0bcda09a (diff)
downloadbfs-ea70127c6dc8c0e6321bcf42d18fd9f229bc1642.tar.xz
tests: Make test_xattr a sudo test in exactly the right cases
This was broken on GNU Hurd, for example.
-rwxr-xr-xtests.sh25
1 files changed, 14 insertions, 11 deletions
diff --git a/tests.sh b/tests.sh
index bf0a65e..dac6f1b 100755
--- a/tests.sh
+++ b/tests.sh
@@ -663,17 +663,20 @@ sudo_tests=(
test_xtype_bind_mount
)
-if [ "$UNAME" = "Linux" ]; then
- sudo_tests+=(
- test_xattr
- test_L_xattr
- )
-else
- bsd_tests+=(
- test_xattr
- test_L_xattr
- )
-fi
+case "$UNAME" in
+ Darwin|FreeBSD)
+ bsd_tests+=(
+ test_xattr
+ test_L_xattr
+ )
+ ;;
+ *)
+ sudo_tests+=(
+ test_xattr
+ test_L_xattr
+ )
+ ;;
+esac
if [ "$DEFAULT" ]; then
POSIX=yes