diff options
-rw-r--r-- | tests/local.at | 13 | ||||
-rwxr-xr-x | tests/remove-1.sh | 1 | ||||
-rwxr-xr-x | tests/unlink-1.sh | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/tests/local.at b/tests/local.at index c31e876..f0f7894 100644 --- a/tests/local.at +++ b/tests/local.at @@ -1,4 +1,15 @@ -m4_defun([SB_RUN],[env SANDBOX_BEEP=0 SANDBOX_LOG="$PWD/sandbox.log" sandbox.sh set -x \;]) +dnl Start with write access to parent dir to force tests to declare +dnl explicit deny paths when they want to test that behavior. That +dnl way we get same result when run under an implicit write path like +dnl any of the tempdirs. +m4_defun([SB_RUN],[\ + env \ + SANDBOX_BEEP=0 \ + SANDBOX_LOG="$PWD/sandbox.log" \ + sandbox.sh \ + set -x \; \ + addwrite "${PWD%/*}" \;\ +]) m4_defun([AT_SB_CHECK],[AT_CHECK([SB_RUN $1],[$2],[$3],[$4],[$5],[$6])]) diff --git a/tests/remove-1.sh b/tests/remove-1.sh index 89c2a7e..2ebcda3 100755 --- a/tests/remove-1.sh +++ b/tests/remove-1.sh @@ -3,5 +3,6 @@ [ "${at_xfail}" = "yes" ] && exit 77 # see trace-0 export SANDBOX_LOG=$PWD/sb.log +adddeny "${PWD}" remove-0 -1 f test -e sb.log diff --git a/tests/unlink-1.sh b/tests/unlink-1.sh index 74d4403..62e23ea 100755 --- a/tests/unlink-1.sh +++ b/tests/unlink-1.sh @@ -3,5 +3,6 @@ [ "${at_xfail}" = "yes" ] && exit 77 # see trace-0 export SANDBOX_LOG=$PWD/sb.log +adddeny "${PWD}" unlink-0 -1 f test -e sb.log |