tests: improve unbuffer check

* remove obsolete stdbuf check

* check for unbuffer command in ts_run() than skip all test

Reported-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2019-08-27 14:28:11 +02:00
parent 2ede7ec214
commit 751fae0d96
4 changed files with 1 additions and 4 deletions

View File

@ -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;;

View File

@ -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)

View File

@ -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()

View File

@ -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"