]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: improve unbuffer check
authorKarel Zak <kzak@redhat.com>
Tue, 27 Aug 2019 12:28:11 +0000 (14:28 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 27 Aug 2019 12:28:11 +0000 (14:28 +0200)
* 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>
tests/functions.sh
tests/ts/libfdisk/mkpart-full
tests/ts/misc/swaplabel
tests/ts/rename/exit_codes

index 67fab1d83fc72a846b404b19a134e99ba9f348d4..99af0e28951f67fd8717be3c934dbf12f24b5fee 100644 (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;;
index 4724074ef345b39e92b0ef5ac9626b376146d22e..9fb46ef67074d0da653cbf0ce0c9d358e7f4da84 100755 (executable)
@@ -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)
 
index 4388464260b2a072aebb314a7932bfa4cf2420d5..106cb7d213a48c4f05678171963b9e7ba2358f9e 100755 (executable)
@@ -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()
index 5ebd37a295fcccdba5becac0bcead79ed1054433..5f8438f27cf725768d6d1fc1397dcb394715cf0d 100755 (executable)
@@ -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"