]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use 'exit 0' instead of 'return' in test scripts
authorLuca Boccassi <luca.boccassi@gmail.com>
Tue, 1 Apr 2025 08:55:52 +0000 (09:55 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 1 Apr 2025 09:59:27 +0000 (10:59 +0100)
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

index 5b142e178acb682552e8c6173a4e12a569b41f49..b4f3c582397db8a75d3468ef84d1a18cb489e2c0 100755 (executable)
@@ -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