summaryrefslogtreecommitdiffstats
path: root/test/testsuite-63.units
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:35:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:35:18 +0000
commitb750101eb236130cf056c675997decbac904cc49 (patch)
treea5df1a06754bdd014cb975c051c83b01c9a97532 /test/testsuite-63.units
parentInitial commit. (diff)
downloadsystemd-b750101eb236130cf056c675997decbac904cc49.tar.xz
systemd-b750101eb236130cf056c675997decbac904cc49.zip
Adding upstream version 252.22.upstream/252.22upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/testsuite-63.units')
-rw-r--r--test/testsuite-63.units/test63-glob.path3
-rw-r--r--test/testsuite-63.units/test63-glob.service7
-rw-r--r--test/testsuite-63.units/test63-issue-24577-dep.service4
-rw-r--r--test/testsuite-63.units/test63-issue-24577.path3
-rw-r--r--test/testsuite-63.units/test63-issue-24577.service8
-rw-r--r--test/testsuite-63.units/test63.path6
-rw-r--r--test/testsuite-63.units/test63.service8
7 files changed, 39 insertions, 0 deletions
diff --git a/test/testsuite-63.units/test63-glob.path b/test/testsuite-63.units/test63-glob.path
new file mode 100644
index 0000000..5f237a9
--- /dev/null
+++ b/test/testsuite-63.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/testsuite-63.units/test63-glob.service b/test/testsuite-63.units/test63-glob.service
new file mode 100644
index 0000000..3f49dd4
--- /dev/null
+++ b/test/testsuite-63.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/testsuite-63.units/test63-issue-24577-dep.service b/test/testsuite-63.units/test63-issue-24577-dep.service
new file mode 100644
index 0000000..e332ea4
--- /dev/null
+++ b/test/testsuite-63.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/testsuite-63.units/test63-issue-24577.path b/test/testsuite-63.units/test63-issue-24577.path
new file mode 100644
index 0000000..80ba1db
--- /dev/null
+++ b/test/testsuite-63.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/testsuite-63.units/test63-issue-24577.service b/test/testsuite-63.units/test63-issue-24577.service
new file mode 100644
index 0000000..568518b
--- /dev/null
+++ b/test/testsuite-63.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/testsuite-63.units/test63.path b/test/testsuite-63.units/test63.path
new file mode 100644
index 0000000..64d5ed6
--- /dev/null
+++ b/test/testsuite-63.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/testsuite-63.units/test63.service b/test/testsuite-63.units/test63.service
new file mode 100644
index 0000000..01a928b
--- /dev/null
+++ b/test/testsuite-63.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