|
3 | 3 | set -ex |
4 | 4 | set -o pipefail |
5 | 5 |
|
| 6 | +# shellcheck source=test/units/assert.sh |
| 7 | +. "$(dirname "$0")"/assert.sh |
| 8 | + |
6 | 9 | systemctl log-level debug |
7 | 10 |
|
8 | 11 | # Test that a path unit continuously triggering a service that fails condition checks eventually fails with |
@@ -41,6 +44,42 @@ systemctl stop test63-glob.path test63-glob.service |
41 | 44 |
|
42 | 45 | test "$(busctl --json=short get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/test63_2dglob_2eservice org.freedesktop.systemd1.Unit ActivationDetails)" = '{"type":"a(ss)","data":[]}' |
43 | 46 |
|
| 47 | +# tests for issue https://github.com/systemd/systemd/issues/24577#issuecomment-1522628906 |
| 48 | +rm -f /tmp/hoge |
| 49 | +systemctl start test63-issue-24577.path |
| 50 | +systemctl status -n 0 test63-issue-24577.path |
| 51 | +systemctl status -n 0 test63-issue-24577.service || : |
| 52 | +systemctl list-jobs |
| 53 | +output=$(systemctl list-jobs --no-legend) |
| 54 | +assert_not_in "test63-issue-24577.service" "$output" |
| 55 | +assert_not_in "test63-issue-24577-dep.service" "$output" |
| 56 | + |
| 57 | +touch /tmp/hoge |
| 58 | +systemctl status -n 0 test63-issue-24577.path |
| 59 | +systemctl status -n 0 test63-issue-24577.service || : |
| 60 | +systemctl list-jobs |
| 61 | +output=$(systemctl list-jobs --no-legend) |
| 62 | +assert_in "test63-issue-24577.service" "$output" |
| 63 | +assert_in "test63-issue-24577-dep.service" "$output" |
| 64 | + |
| 65 | +# even if the service is stopped, it will be soon retriggered. |
| 66 | +systemctl stop test63-issue-24577.service |
| 67 | +systemctl status -n 0 test63-issue-24577.path |
| 68 | +systemctl status -n 0 test63-issue-24577.service || : |
| 69 | +systemctl list-jobs |
| 70 | +output=$(systemctl list-jobs --no-legend) |
| 71 | +assert_in "test63-issue-24577.service" "$output" |
| 72 | +assert_in "test63-issue-24577-dep.service" "$output" |
| 73 | + |
| 74 | +rm -f /tmp/hoge |
| 75 | +systemctl stop test63-issue-24577.service |
| 76 | +systemctl status -n 0 test63-issue-24577.path |
| 77 | +systemctl status -n 0 test63-issue-24577.service || : |
| 78 | +systemctl list-jobs |
| 79 | +output=$(systemctl list-jobs --no-legend) |
| 80 | +assert_not_in "test63-issue-24577.service" "$output" |
| 81 | +assert_in "test63-issue-24577-dep.service" "$output" |
| 82 | + |
44 | 83 | systemctl log-level info |
45 | 84 |
|
46 | 85 | echo OK >/testok |
0 commit comments