summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-63.service
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2021-10-18 14:17:02 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2021-11-03 21:25:14 +0100
commit12ab94a1e4961a39c32efb60b71866ab588d3ea2 (patch)
tree4d4a316d5e2ec0dbccbc54a6c38a604f980718dc /test/units/testsuite-63.service
parentmkosi: Add netcat to fedora image (diff)
downloadsystemd-12ab94a1e4961a39c32efb60b71866ab588d3ea2.tar.xz
systemd-12ab94a1e4961a39c32efb60b71866ab588d3ea2.zip
core: Propagate condition failed state to triggering units.
Alternative to https://github.com/systemd/systemd/pull/20531. Whenever a service triggered by another unit fails condition checks, stop the triggering unit to prevent systemd busy looping trying to start the triggered unit.
Diffstat (limited to '')
-rw-r--r--test/units/testsuite-63.service8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/units/testsuite-63.service b/test/units/testsuite-63.service
index 0a8d143be9..616d8a6acc 100644
--- a/test/units/testsuite-63.service
+++ b/test/units/testsuite-63.service
@@ -8,10 +8,10 @@ Type=oneshot
ExecStart=rm -f /tmp/nonexistent
ExecStart=systemctl start test63.path
ExecStart=touch /tmp/test63
-# Make sure systemd has sufficient time to hit the start limit for test63.service.
ExecStart=sleep 2
-ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = failed'
-ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = start-limit-hit'
+# Ensure both the service and the corresponding path unit go inactive due to the failed condition check.
+ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = inactive'
+ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = success'
ExecStart=sh -x -c 'test "$(systemctl show test63.path -P ActiveState)" = failed'
-ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = unit-start-limit-hit'
+ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = unit-condition-failed'
ExecStart=sh -x -c 'echo OK >/testok'