summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-08-02 21:15:12 +0200
committerLuca Boccassi <bluca@debian.org>2022-08-23 22:19:54 +0200
commitc8bc7519c888a99134f88f8c82353246d3c0cc5d (patch)
treea7733a97f5c2487dc1998c8a2f3e88b30caca187 /test
parentservice: set TRIGGER_UNIT= and TRIGGER_PATH= on activation by path unit (diff)
downloadsystemd-c8bc7519c888a99134f88f8c82353246d3c0cc5d.tar.xz
systemd-c8bc7519c888a99134f88f8c82353246d3c0cc5d.zip
service: set TRIGGER_UNIT= and TRIGGER_TIMER_REALTIME_USEC/MONOTONIC_USEC on activation by timer unit
Same as path unit, best effort.
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/testsuite-07.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/units/testsuite-07.sh b/test/units/testsuite-07.sh
index 5e9fe64ea9..95ebe3876f 100755
--- a/test/units/testsuite-07.sh
+++ b/test/units/testsuite-07.sh
@@ -8,6 +8,9 @@ set -o pipefail
cat >/lib/systemd/system/my.service <<EOF
[Service]
Type=oneshot
+ExecStartPre=sh -c 'test "\$TRIGGER_UNIT" = my.timer'
+ExecStartPre=sh -c 'test -n "\$TRIGGER_TIMER_REALTIME_USEC"'
+ExecStartPre=sh -c 'test -n "\$TRIGGER_TIMER_MONOTONIC_USEC"'
ExecStart=/bin/echo Timer runs me
EOF