test: drop forgotten set +e
This was introduced all the way back in 2019 where this particular test case was the last one in the file, so it worked as intended. Unfortunately, since then we added new tests after this one, which means this particular `set +e` masked fails in any of them (except for assert_*() calls, which call exit on fail).
This commit is contained in:
@@ -98,14 +98,11 @@ ELAPSED=$((END_SEC-START_SEC))
|
||||
|
||||
# Test time-limited scopes
|
||||
START_SEC=$(date -u '+%s')
|
||||
set +e
|
||||
systemd-run --scope --property=RuntimeMaxSec=3s sleep 30
|
||||
RESULT=$?
|
||||
(! systemd-run --scope --property=RuntimeMaxSec=3s sleep 30)
|
||||
END_SEC=$(date -u '+%s')
|
||||
ELAPSED=$((END_SEC-START_SEC))
|
||||
[[ "$ELAPSED" -ge 3 ]]
|
||||
[[ "$ELAPSED" -le 10 ]]
|
||||
[[ "$RESULT" -ne 0 ]]
|
||||
|
||||
# Test transactions with cycles
|
||||
# Provides coverage for issues like https://github.com/systemd/systemd/issues/26872
|
||||
@@ -121,7 +118,9 @@ EOF
|
||||
done
|
||||
systemctl daemon-reload
|
||||
for i in {0..19}; do
|
||||
systemctl start "transaction-cycle$i.service"
|
||||
# This intentionally fails with:
|
||||
# Failed to start transaction-cycle0.service: Transaction order is cyclic. See system logs for details.
|
||||
systemctl start "transaction-cycle$i.service" || :
|
||||
done
|
||||
|
||||
IDS_FILE="/tmp/TEST-03-JOBS-CYCLE-IDS-$RANDOM"
|
||||
@@ -168,6 +167,8 @@ assert_rc 3 systemctl --quiet is-active succeeds-on-restart.target
|
||||
systemctl start fails-on-restart.target || :
|
||||
assert_rc 3 systemctl --quiet is-active fails-on-restart.target
|
||||
|
||||
systemctl stop fails-on-restart.service
|
||||
|
||||
COUNTER_FILE=/tmp/test-03-restart-counter
|
||||
export FAILURE_FLAG_FILE=/tmp/test-03-restart-failure-flag
|
||||
|
||||
|
||||
Reference in New Issue
Block a user