From 78e9bb837c258ac0ec7712b3d612cc2f407e731e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:42 +0200 Subject: Merging upstream version 256. Signed-off-by: Daniel Baumann --- test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path | 3 +++ test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service | 7 +++++++ .../TEST-63-PATH.units/test63-issue-24577-dep.service | 4 ++++ test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path | 3 +++ test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service | 8 ++++++++ test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path | 3 +++ test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service | 5 +++++ test/TEST-63-PATH/TEST-63-PATH.units/test63.path | 6 ++++++ test/TEST-63-PATH/TEST-63-PATH.units/test63.service | 8 ++++++++ 9 files changed, 47 insertions(+) create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.path create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577-dep.service create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.path create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63-issue-24577.service create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.path create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63-pr-30768.service create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63.path create mode 100644 test/TEST-63-PATH/TEST-63-PATH.units/test63.service (limited to 'test/TEST-63-PATH/TEST-63-PATH.units') 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 -- cgit v1.2.3