]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: don't skip on incorrectly search executables
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 17 Apr 2023 16:30:05 +0000 (18:30 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 17 Apr 2023 16:30:05 +0000 (18:30 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tests/functions.sh

index 2f02af328ae16cd3a834a07ac33b013d5a5cc997..3d2c93d77af34885cc0c744409069fe13c815128 100644 (file)
@@ -77,6 +77,9 @@ function ts_report {
 
 function ts_check_test_command {
        case "$1" in
+       "")
+               ts_failed "invalid test_command requested"
+               ;;
        */*)
                # paths
                if [ ! -x "$1" ]; then
@@ -99,6 +102,7 @@ function ts_check_test_command {
 
 function ts_check_prog {
        local cmd=$1
+       [ -z "$cmd" ] && ts_failed "invalid prog requested"
        type "$cmd" >/dev/null 2>&1 || ts_skip "missing in PATH: $cmd"
 }