From 25aa2451916883e4ea4d494bef48cce3a14efb41 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 21 Nov 2016 10:04:00 +0100 Subject: [PATCH] More travis ACL / chattr tests --- dev/tests/run_tests.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dev/tests/run_tests.sh b/dev/tests/run_tests.sh index e796873..e8ba0db 100755 --- a/dev/tests/run_tests.sh +++ b/dev/tests/run_tests.sh @@ -209,11 +209,13 @@ function oneTimeSetUp () { #TODO: Assuming that macos has the same syntax than bsd here if [ "$LOCAL_OS" == "BSD" ] || [ "$LOCAL_OS" == "MacOSX" ]; then + SUDO_CMD="" IMMUTABLE_ON_CMD="chflags schg" IMMUTABLE_OFF_CMD="chflags noschg" else IMMUTABLE_ON_CMD="chattr +i" IMMUTABLE_OFF_CMD="chattr -i" + SUDO_CMD="sudo" fi # Get osync version @@ -227,13 +229,10 @@ function oneTimeSetUp () { # This will make travis fail because of missing stuff touch fic - sudo chattr +i fic - mount -o remount,acl / - setfacl -m o::rwx fic + $SUDO_CMD chattr +i fic + $SUDO_CMD setfacl -m o::rwx fic getfacl fic - mkdir test - ( sleep 20 && touch test/fic ) & - inotifywait test + exit } function oneTimeTearDown () {