summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/csplit-io-err.sh6
-rwxr-xr-xtests/misc/nohup.sh4
-rwxr-xr-xtests/misc/printenv.sh6
-rwxr-xr-xtests/rm/rm-readdir-fail.sh3
4 files changed, 12 insertions, 7 deletions
diff --git a/tests/misc/csplit-io-err.sh b/tests/misc/csplit-io-err.sh
index 982df161f..900e38bee 100755
--- a/tests/misc/csplit-io-err.sh
+++ b/tests/misc/csplit-io-err.sh
@@ -66,9 +66,9 @@ gcc_shared_ k.c k.so \
# Split the input, and force fwrite() failure -
# the 'csplit' command should fail with exit code 1
# (checked with 'returns_ 1 ... || fail=1')
-seq 10 \
- | LD_PRELOAD=$LD_PRELOAD:./k.so returns_ 1 csplit - 1 4 2>out \
- || fail=1
+seq 10 |
+(export LD_PRELOAD=$LD_PRELOAD:./k.so
+ returns_ 1 csplit - 1 4 2>out) || fail=1
test -e preloaded || skip_ 'LD_PRELOAD interception failed'
diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh
index e9c8c389a..1b43b606f 100755
--- a/tests/misc/nohup.sh
+++ b/tests/misc/nohup.sh
@@ -118,6 +118,8 @@ EOF
# Make sure it fails with exit status of 125 when given too few arguments,
# except that POSIX requires 127 in this case.
returns_ 125 nohup >/dev/null 2>&1 || fail=1
-POSIXLY_CORRECT=1 returns_ 127 nohup >/dev/null 2>&1 || fail=1
+export POSIXLY_CORRECT=1
+returns_ 127 nohup >/dev/null 2>&1 || fail=1
+unset POSIXLY_CORRECT
Exit $fail
diff --git a/tests/misc/printenv.sh b/tests/misc/printenv.sh
index 2017e5df6..b33c0292c 100755
--- a/tests/misc/printenv.sh
+++ b/tests/misc/printenv.sh
@@ -59,8 +59,10 @@ EOF
compare exp out || fail=1
# Exit status reflects missing variable, but remaining arguments processed.
-ENV_TEST1=a returns_ 1 env -- printenv ENV_TEST2 ENV_TEST1 > out || fail=1
-ENV_TEST1=a returns_ 1 env -- printenv ENV_TEST1 ENV_TEST2 >> out || fail=1
+export ENV_TEST1=a
+returns_ 1 env -- printenv ENV_TEST2 ENV_TEST1 > out || fail=1
+returns_ 1 env -- printenv ENV_TEST1 ENV_TEST2 >> out || fail=1
+unset ENV_TEST1
cat <<EOF > exp || framework_failure_
a
a
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