diff --git a/test/units/TEST-21-DFUZZER.sh b/test/units/TEST-21-DFUZZER.sh index fdf0e80549..555b8a1592 100755 --- a/test/units/TEST-21-DFUZZER.sh +++ b/test/units/TEST-21-DFUZZER.sh @@ -4,7 +4,7 @@ set -eux set -o pipefail # check dfuzzer is present before testing -if ! command -v dfuzzer &>/dev/null; then +if ! command -v dfuzzer >/dev/null; then echo "dfuzzer is not installed, skipping" | tee --append /skipped exit 77 fi diff --git a/test/units/TEST-46-HOMED.sh b/test/units/TEST-46-HOMED.sh index 12a1e3d884..8a6aa54fa1 100755 --- a/test/units/TEST-46-HOMED.sh +++ b/test/units/TEST-46-HOMED.sh @@ -537,7 +537,7 @@ for opt in json multiplexer output synthesize with-dropin with-nss with-varlink; done # FIXME: sshd seems to crash inside asan currently, skip the actual ssh test hence -if command -v ssh &>/dev/null && command -v sshd &>/dev/null && ! [[ -v ASAN_OPTIONS ]]; then +if command -v ssh >/dev/null && command -v sshd >/dev/null && ! [[ -v ASAN_OPTIONS ]]; then at_exit() { set +e diff --git a/test/units/TEST-50-DISSECT.DDI.sh b/test/units/TEST-50-DISSECT.DDI.sh index 42c9a4312a..9f8ecfc1b7 100755 --- a/test/units/TEST-50-DISSECT.DDI.sh +++ b/test/units/TEST-50-DISSECT.DDI.sh @@ -9,7 +9,7 @@ mount -t ddi "$MINIMAL_IMAGE.gpt" "$dir" -o ro,X-mount.mkdir,discard umount -R "$dir" # Test systemd-repart --make-ddi=: -if [[ -z "${OPENSSL_CONFIG:?}" ]] || ! command -v mksquashfs &>/dev/null; then +if [[ -z "${OPENSSL_CONFIG:?}" ]] || ! command -v mksquashfs >/dev/null; then echo "Skipping --make-ddi= tests" exit 0 fi diff --git a/test/units/TEST-74-AUX-UTILS.ssh.sh b/test/units/TEST-74-AUX-UTILS.ssh.sh index da2188ea3e..890763c9dc 100755 --- a/test/units/TEST-74-AUX-UTILS.ssh.sh +++ b/test/units/TEST-74-AUX-UTILS.ssh.sh @@ -3,7 +3,7 @@ set -eux set -o pipefail -if ! command -v ssh &> /dev/null || ! command -v sshd &> /dev/null ; then +if ! command -v ssh >/dev/null || ! command -v sshd >/dev/null ; then echo "ssh/sshd not found, skipping test." >&2 exit 0 fi @@ -58,11 +58,11 @@ ssh -o StrictHostKeyChecking=no -v -i "$ROOTID" .host cat /etc/machine-id | cmp ssh -o StrictHostKeyChecking=no -v -i "$ROOTID" unix/run/ssh-unix-local/socket cat /etc/machine-id | cmp - /etc/machine-id ssh -o StrictHostKeyChecking=no -v -i "$ROOTID" machine/.host cat /etc/machine-id | cmp - /etc/machine-id -modprobe vsock_loopback ||: +modprobe vsock_loopback || : if test -e /dev/vsock -a -d /sys/module/vsock_loopback ; then ssh -o StrictHostKeyChecking=no -v -i "$ROOTID" vsock/1 cat /etc/machine-id | cmp - /etc/machine-id - if ! command -v scp &> /dev/null ; then + if ! command -v scp >/dev/null ; then echo "scp not found, skipping subtest" >&2 else OUT_FILE=$(mktemp -u) diff --git a/test/units/TEST-75-RESOLVED.sh b/test/units/TEST-75-RESOLVED.sh index 24c9c8ffac..39cd4c717d 100755 --- a/test/units/TEST-75-RESOLVED.sh +++ b/test/units/TEST-75-RESOLVED.sh @@ -1122,7 +1122,7 @@ testcase_13_varlink_subscribe_dns_configuration() { { echo "[Resolve]" echo "DNS=" - } > /run/systemd/resolved.conf.d/90-global-dns.conf + } >/run/systemd/resolved.conf.d/90-global-dns.conf systemctl reload systemd-resolved.service resolvectl dns dns0 "" resolvectl domain dns0 "" @@ -1140,7 +1140,7 @@ testcase_13_varlink_subscribe_dns_configuration() { echo "[Resolve]" echo "DNS=8.8.8.8" echo "Domains=lan" - } > /run/systemd/resolved.conf.d/90-global-dns.conf + } >/run/systemd/resolved.conf.d/90-global-dns.conf systemctl reload systemd-resolved.service # Update a link configuration. @@ -1362,7 +1362,7 @@ testcase_15_wait_online_dns() { echo "[Resolve]" echo "DNS=" echo "FallbackDNS=" - } > "$override" + } >"$override" systemctl reload systemd-resolved.service resolvectl dns dns0 "" resolvectl domain dns0 "" @@ -1382,7 +1382,7 @@ testcase_15_wait_online_dns() { { echo "[Resolve]" echo "DNS=10.0.0.1" - } > "$override" + } >"$override" systemctl restart systemd-resolved.service # Wait for the monitor to exit gracefully. @@ -1390,10 +1390,10 @@ testcase_15_wait_online_dns() { journalctl --sync # Check that a disconnect happened, and was handled. - journalctl -b -u "$unit" --grep="DNS configuration monitor disconnected, reconnecting..." > /dev/null + journalctl -b -u "$unit" --grep="DNS configuration monitor disconnected, reconnecting..." >/dev/null # Check that dns0 was found to be online. - journalctl -b -u "$unit" --grep="dns0: link is configured by networkd and online." > /dev/null + journalctl -b -u "$unit" --grep="dns0: link is configured by networkd and online." >/dev/null } testcase_delegate() {