diff --git a/test/units/testsuite-63.sh b/test/units/testsuite-63.sh index 591e6d3104..59a7b3208f 100755 --- a/test/units/testsuite-63.sh +++ b/test/units/testsuite-63.sh @@ -15,10 +15,10 @@ systemctl start test63.path touch /tmp/test63 # Make sure systemd has sufficient time to hit the trigger limit for test63.path. -sleep 2 +# shellcheck disable=SC2016 +timeout 30 bash -c 'while ! test "$(systemctl show test63.path -P ActiveState)" = failed; do sleep .2; done' test "$(systemctl show test63.service -P ActiveState)" = inactive test "$(systemctl show test63.service -P Result)" = success -test "$(systemctl show test63.path -P ActiveState)" = failed test "$(systemctl show test63.path -P Result)" = trigger-limit-hit # Test that starting the service manually doesn't affect the path unit.