1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-24 02:08:57 +03:00

tests: misc: skip a test if the absolute top build dir is unsafe

Without this change, this test would fail during 'make distcheck', for
example.

* tests/misc/exec-bad-unicode.sh: Skip the test if $abs_top_builddir has
spaces or special characters.
* cfg.mk (_tb_misc): Also match tests/misc/exec-bad-unicode.sh.
Reported by Bruno Haible.
This commit is contained in:
Collin Funk
2026-10-06 19:56:06 -07:00
parent d5ee8b245c
commit 9a38bb9186
2 changed files with 10 additions and 1 deletions

2
cfg.mk
View File

@@ -988,7 +988,7 @@ exclude_file_name_regexp--sc_prohibit_continued_string_alpha_in_column_1 = \
^src/(system\.h|od\.c|printf\.c|getlimits\.c)$$
_cksum = ^tests/cksum/cksum-base64\.pl$$
_tb_misc = misc/(stdbuf|responsive)
_tb_misc = misc/(exec-bad-unicode|stdbuf|responsive)
exclude_file_name_regexp--sc_prohibit_test_backticks = \
^tests/(local\.mk|(init|$(_tb_misc)|factor/create-test)\.sh)$$|$(_cksum)

View File

@@ -19,6 +19,15 @@
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
# stdbuf fails when the absolute top build dir name contains e.g.,
# space, TAB, NL
lf='
'
case $abs_top_builddir in
*[\\\"\#\$\&\'\`$lf\ \ ]*)
skip_ "unsafe absolute build directory name: $abs_top_builddir";;
esac
script="$(bad_unicode)"
# Create a program with invalid Unicode in its name.