From ea70127c6dc8c0e6321bcf42d18fd9f229bc1642 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 14 Jan 2020 16:17:53 -0500 Subject: tests: Make test_xattr a sudo test in exactly the right cases This was broken on GNU Hurd, for example. --- tests.sh | 25 ++++++++++++++----------- 1 file 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 -- cgit v1.2.3