summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-20 18:27:07 +0200
committerJim Meyering <meyering@redhat.com>2009-08-20 19:47:12 +0200
commit7f242fadfa216eac6ebb20721943b6e4e90300c7 (patch)
treea4d604f995191b9ab29cee8572b660261e97b1dc
parent3db7c2c03c4c6daf358925d1c585fcbb478fa25a (diff)
downloadcoreutils-7f242fadfa216eac6ebb20721943b6e4e90300c7.tar.xz
tests: skip the stdbuf tests when the abs build directory name is bogus
* tests/misc/stdbuf: Avoid spurious failure when the directory name from which we'd set LD_PRELOAD contains unsafe characters.
-rwxr-xr-xtests/misc/stdbuf8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf
index a9aed43d5..337504028 100755
--- a/tests/misc/stdbuf
+++ b/tests/misc/stdbuf
@@ -30,6 +30,14 @@ case " $built_programs " in
*) skip_test_ 'stdbuf not built';;
esac
+# stdbuf fails when the absolute top build dir name contains e.g., space, TAB, NL
+lf='
+'
+case $abs_top_builddir in
+ *[\\\"\#\$\&\'\`$lf\ \ ]*)
+ skip_test_ "unsafe absolute build directory name: $abs_top_builddir";;
+esac
+
# Use a fifo rather than a pipe in the tests below
# so that the producer (uniq) will wait until the
# consumer (dd) opens the fifo therefore increasing