diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-26 18:22:54 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-30 09:59:30 +0200 |
commit | 8acb02f3958cae35eb3011e36ef95e3fcc576e41 (patch) | |
tree | 1afbfd9ac4d024852ec2268e878a08f7483556ea | |
parent | TEST-05-RLIMITS: Bump memory limits (diff) | |
download | systemd-8acb02f3958cae35eb3011e36ef95e3fcc576e41.tar.xz systemd-8acb02f3958cae35eb3011e36ef95e3fcc576e41.zip |
TEST-02-UNITTESTS: Fix exit code checks
-rwxr-xr-x | test/units/TEST-02-UNITTESTS.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/units/TEST-02-UNITTESTS.sh b/test/units/TEST-02-UNITTESTS.sh index 0c8de536ef..aac55ea17c 100755 --- a/test/units/TEST-02-UNITTESTS.sh +++ b/test/units/TEST-02-UNITTESTS.sh @@ -60,22 +60,22 @@ run_test() { exec {LOCK_FD}> /lock flock --exclusive ${LOCK_FD} - if [[ $ret -ne 0 && $ret != 77 && $ret != 127 ]]; then - echo "$name failed with $ret" - echo "$name" >>/failed-tests + if [[ $ret -eq 77 ]] || [[ $ret -eq 127 ]]; then + echo "$name skipped" + echo "$name" >>/skipped-tests { echo "--- $name begin ---" journalctl --unit="$name" --no-hostname -o short-monotonic echo "--- $name end ---" - } >>/failed - elif [[ $ret == 77 || $ret == 127 ]]; then - echo "$name skipped" - echo "$name" >>/skipped-tests + } >>/skipped + elif [[ $ret -ne 0 ]]; then + echo "$name failed with $ret" + echo "$name" >>/failed-tests { echo "--- $name begin ---" journalctl --unit="$name" --no-hostname -o short-monotonic echo "--- $name end ---" - } >>/skipped + } >>/failed else echo "$name OK" echo "$name" >>/testok |