From 4b85218629c1a9a97cffb38fd7eb4ed4cdc1b5b4 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 1 Apr 2025 09:55:52 +0100 Subject: [PATCH] test: use 'exit 0' instead of 'return' in test scripts 14385s [ 66.896852] TEST-87-AUX-UTILS-VM.sh[3744]: + test -x /usr/lib/systemd/systemd-validatefs 14385s [ 66.898544] TEST-87-AUX-UTILS-VM.sh[3744]: + echo 'no systemd-validatefs' 14385s [ 66.899115] TEST-87-AUX-UTILS-VM.sh[3744]: no systemd-validatefs 14385s [ 66.899699] TEST-87-AUX-UTILS-VM.sh[3744]: + return 14385s [ 66.900189] TEST-87-AUX-UTILS-VM.sh[3744]: .//usr/lib/systemd/tests/testdata/units/TEST-87-AUX-UTILS-VM.validatefs.sh: line 13: return: can only `return' from a function or sourced script Follow-up for 6e003d18bbf5e9f55c08b25d80b138b3a98d5f26 --- test/units/TEST-87-AUX-UTILS-VM.validatefs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/units/TEST-87-AUX-UTILS-VM.validatefs.sh b/test/units/TEST-87-AUX-UTILS-VM.validatefs.sh index 5b142e178ac..b4f3c582397 100755 --- a/test/units/TEST-87-AUX-UTILS-VM.validatefs.sh +++ b/test/units/TEST-87-AUX-UTILS-VM.validatefs.sh @@ -5,12 +5,12 @@ set -o pipefail if ! command -v systemd-repart >/dev/null; then echo "no systemd-repart" - return + exit 0 fi if ! test -x /usr/lib/systemd/systemd-validatefs ; then echo "no systemd-validatefs" - return + exit 0 fi export SYSTEMD_LOG_LEVEL=debug -- 2.47.3