From: Yu Watanabe Date: Sun, 20 Jul 2025 00:32:14 +0000 (+0900) Subject: test: missing -v option for command X-Git-Tag: v258-rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cfa513356413fbe2baf510b426f91d56d8fd7b8;p=thirdparty%2Fsystemd.git test: missing -v option for command Otherwise the specified command is invoked, not only checking the existence of the command. --- diff --git a/test/units/TEST-17-UDEV.verify.sh b/test/units/TEST-17-UDEV.verify.sh index b456fdef726..f0c4f1a2a7f 100755 --- a/test/units/TEST-17-UDEV.verify.sh +++ b/test/units/TEST-17-UDEV.verify.sh @@ -293,7 +293,7 @@ test_syntax_error 'OWNER!="b"' 'Invalid operator for OWNER.' test_syntax_error 'OWNER+="0"' "OWNER key takes '=' or ':=' operator, assuming '='." # numeric system UID is valid even if it does not exist SYS_UID_MAX=999 -if command userdbctl >/dev/null; then +if command -v userdbctl >/dev/null; then # For the case if non-default setting is used. E.g. OpenSUSE uses 499. SYS_UID_MAX="$(userdbctl user -S --no-legend --no-pager | grep 'end system' | awk '{print $8}')" echo "SYS_UID_MAX=$SYS_UID_MAX acquired from userdbctl" @@ -325,7 +325,7 @@ test_syntax_error 'GROUP!="b"' 'Invalid operator for GROUP.' test_syntax_error 'GROUP+="0"' "GROUP key takes '=' or ':=' operator, assuming '='." # numeric system GID is valid even if it does not exist SYS_GID_MAX=999 -if command userdbctl >/dev/null; then +if command -v userdbctl >/dev/null; then # For the case if non-default setting is used. E.g. OpenSUSE uses 499. SYS_GID_MAX="$(userdbctl group -S --no-legend --no-pager | grep 'end system' | awk '{print $8}')" echo "SYS_GID_MAX=$SYS_GID_MAX acquired from userdbctl" diff --git a/test/units/TEST-75-RESOLVED.sh b/test/units/TEST-75-RESOLVED.sh index 1bde5f3b76d..2018a40f394 100755 --- a/test/units/TEST-75-RESOLVED.sh +++ b/test/units/TEST-75-RESOLVED.sh @@ -16,7 +16,7 @@ set -o pipefail # shellcheck source=test/units/util.sh . "$(dirname "$0")"/util.sh -if ! command knotc >/dev/null; then +if ! command -v knotc >/dev/null; then echo "command knotc not found, skipping..." | tee --append /skipped exit 77 fi