From 7f242fadfa216eac6ebb20721943b6e4e90300c7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 20 Aug 2009 18:27:07 +0200 Subject: 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. --- tests/misc/stdbuf | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/misc/stdbuf') 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 -- cgit v1.2.3-54-g00ecf