From: Karel Zak Date: Tue, 27 Aug 2019 12:28:11 +0000 (+0200) Subject: tests: improve unbuffer check X-Git-Tag: v2.35-rc1~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=751fae0d96385230ed3c7109a0345d869db17be3;p=thirdparty%2Futil-linux.git tests: improve unbuffer check * remove obsolete stdbuf check * check for unbuffer command in ts_run() than skip all test Reported-by: Patrick Steinhardt Signed-off-by: Karel Zak --- diff --git a/tests/functions.sh b/tests/functions.sh index 67fab1d83f..99af0e2895 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -425,7 +425,7 @@ function ts_run { while true; do case "$1" in --unbuffered) - if type stdbuf >/dev/null 2>&1; then + if type unbuffer >/dev/null 2>&1; then UNBUFFERED=1 fi shift;; diff --git a/tests/ts/libfdisk/mkpart-full b/tests/ts/libfdisk/mkpart-full index 4724074ef3..9fb46ef670 100755 --- a/tests/ts/libfdisk/mkpart-full +++ b/tests/ts/libfdisk/mkpart-full @@ -27,7 +27,6 @@ TESTPROG="$TS_HELPER_LIBFDISK_MKPART_FULLSPEC" ts_check_test_command "$TESTPROG" ts_check_test_command "$TS_CMD_SFDISK" ts_check_test_command "$TS_CMD_WIPEFS" -ts_check_prog unbuffer TEST_IMAGE_NAME=$(ts_image_init 15) diff --git a/tests/ts/misc/swaplabel b/tests/ts/misc/swaplabel index 4388464260..106cb7d213 100755 --- a/tests/ts/misc/swaplabel +++ b/tests/ts/misc/swaplabel @@ -21,7 +21,6 @@ ts_init "$*" ts_check_test_command "$TS_CMD_MKSWAP" ts_check_test_command "$TS_CMD_SWAPLABEL" ts_check_test_command "$TS_HELPER_SYSINFO" -ts_check_prog unbuffer # fallocate does not work on most file systems function fallocate_or_skip() diff --git a/tests/ts/rename/exit_codes b/tests/ts/rename/exit_codes index 5ebd37a295..5f8438f27c 100755 --- a/tests/ts/rename/exit_codes +++ b/tests/ts/rename/exit_codes @@ -22,7 +22,6 @@ TS_DESC="exit codes" ts_init "$*" ts_check_test_command "$TS_CMD_RENAME" -ts_check_prog unbuffer ts_cd "$TS_OUTDIR"