diff --git a/test/units/TEST-07-PID1.start-limit.sh b/test/units/TEST-07-PID1.start-limit.sh index ed9f4b37c1..93447452da 100755 --- a/test/units/TEST-07-PID1.start-limit.sh +++ b/test/units/TEST-07-PID1.start-limit.sh @@ -35,6 +35,9 @@ for i in {1..5}; do echo "Start #$i" systemctl stop --no-block systemd-resolved.service + # Wait for systemd-resolved in ExecStart= being stopped. + # shellcheck disable=SC2016 + timeout 10 bash -c 'until [[ "$(systemctl show --property=MainPID --value systemd-resolved.service)" == 0 ]]; do sleep 0.1; done' if ! resolvectl; then journalctl -o short-monotonic --no-hostname --no-pager -u systemd-resolved.service -n 15 exit 1