From 055b08ff7853c7c9ab791643047b1b163a227013 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 22 Nov 2016 01:23:22 +0000 Subject: tests: fix false fails due to passing env vars to returns_ On BSD /bin/sh it was seen that unexported env vars passed to returns_() would not be propagated to the wrapped command. * cfg.mk (sc_prohibit_env_returns): Add a syntax check to disallow. * tests/misc/csplit-io-err.sh: Rearrange to export vars in a subshell. * tests/rm/rm-readdir-fail.sh: Likewise. * tests/misc/nohup.sh: Export and unset vars around returns_. * tests/misc/printenv.sh: Likewise. Reported by Assaf Gordon --- tests/rm/rm-readdir-fail.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/rm') diff --git a/tests/rm/rm-readdir-fail.sh b/tests/rm/rm-readdir-fail.sh index d9d8efdb4..835d3424f 100755 --- a/tests/rm/rm-readdir-fail.sh +++ b/tests/rm/rm-readdir-fail.sh @@ -88,7 +88,8 @@ gcc_shared_ k.c k.so \ export READDIR_PARTIAL for READDIR_PARTIAL in '' '1'; do rm -f preloaded - (LD_PRELOAD=$LD_PRELOAD:./k.so returns_ 1 rm -Rf dir 2>>err) || fail=1 + (export LD_PRELOAD=$LD_PRELOAD:./k.so + returns_ 1 rm -Rf dir 2>>err) || fail=1 test -f preloaded || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?" done -- cgit v1.2.3-70-g09d2