diff options
Diffstat (limited to 'test/TEST-63-PATH/TEST-63-PATH.units')
9 files changed, 47 insertions, 0 deletions
diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path b/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path new file mode 100644 index 0000000..5f237a9 --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Path] +PathExistsGlob=/tmp/test63-glob* diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service b/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service new file mode 100644 index 0000000..3f49dd4 --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Service] +ExecStartPre=sh -c 'test "$TRIGGER_PATH" = /tmp/test63-glob-foo' +ExecStartPre=sh -c 'test "$TRIGGER_UNIT" = test63-glob.path' +ExecStart=systemd-notify --ready +RemainAfterExit=yes +Type=notify diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service b/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service new file mode 100644 index 0000000..e332ea4 --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Service] +Type=oneshot +ExecStart=bash -c 'sleep infinity' diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path b/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path new file mode 100644 index 0000000..80ba1db --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Path] +PathExists=/tmp/hoge diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service b/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service new file mode 100644 index 0000000..568518b --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Unit] +Requires=test63-issue-24577-dep.service +After=test63-issue-24577-dep.service + +[Service] +Type=oneshot +ExecStart=bash -c 'sleep infinity' diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path b/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path new file mode 100644 index 0000000..b541358 --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Path] +PathChanged=/tmp/copyme diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service b/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service new file mode 100644 index 0000000..5739084 --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Service] +ExecStart=cp -v /tmp/copyme /tmp/copied +# once cp exits, service goes into deactivating state and then runs ExecStop +ExecStop=flock -e /tmp/noexit true diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63.path b/test/TEST-63-PATH/TEST-63-PATH.units/test63.path new file mode 100644 index 0000000..64d5ed6 --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63.path @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Path] +PathExists=/tmp/test63 +# Make the unit friendly to slower machines +TriggerLimitIntervalSec=10 +TriggerLimitBurst=10 diff --git a/test/TEST-63-PATH/TEST-63-PATH.units/test63.service b/test/TEST-63-PATH/TEST-63-PATH.units/test63.service new file mode 100644 index 0000000..01a928b --- /dev/null +++ b/test/TEST-63-PATH/TEST-63-PATH.units/test63.service @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Unit] +ConditionPathExists=/tmp/nonexistent + +[Service] +ExecStartPre=sh -c 'test "$TRIGGER_PATH" = /tmp/test63' +ExecStartPre=sh -c 'test "$TRIGGER_UNIT" = test63.path' +ExecStart=true |