]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: skip the stdbuf tests when the abs build directory name is bogus
authorJim Meyering <meyering@redhat.com>
Thu, 20 Aug 2009 16:27:07 +0000 (18:27 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 20 Aug 2009 17:47:12 +0000 (19:47 +0200)
* tests/misc/stdbuf: Avoid spurious failure when the directory name
from which we'd set LD_PRELOAD contains unsafe characters.

tests/misc/stdbuf

index a9aed43d5910a6406a497c6f84a153de761cde5f..337504028f51591cdf306f44c2b048378f25e70b 100755 (executable)
@@ -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