1# SPDX-License-Identifier: LGPL-2.1-or-later 2[Unit] 3Description=TEST-63-ISSUE-17433 4 5[Service] 6ExecStartPre=rm -f /failed /testok 7Type=oneshot 8 9# Test that a path unit continuously triggering a service that fails condition checks eventually fails with 10# the trigger-limit-hit error. 11ExecStart=rm -f /tmp/nonexistent 12ExecStart=systemctl start test63.path 13ExecStart=touch /tmp/test63 14# Make sure systemd has sufficient time to hit the trigger limit for test63.path. 15ExecStart=sleep 2 16ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = inactive' 17ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = success' 18ExecStart=sh -x -c 'test "$(systemctl show test63.path -P ActiveState)" = failed' 19ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = trigger-limit-hit' 20 21# Test that starting the service manually doesn't affect the path unit. 22ExecStart=rm -f /tmp/test63 23ExecStart=systemctl reset-failed 24ExecStart=systemctl start test63.path 25ExecStart=systemctl start test63.service 26ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = inactive' 27ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = success' 28ExecStart=sh -x -c 'test "$(systemctl show test63.path -P ActiveState)" = active' 29ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = success' 30ExecStart=sh -x -c 'echo OK >/testok' 31