summaryrefslogtreecommitdiffstats
path: root/test/test-execute/exec-specifier@.service
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-11-24 10:17:28 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-24 10:17:28 +0100
commit8b3c4b57573727124a065d6dafcfe0b862e08b94 (patch)
tree01eb1e6e97716973319174feea14fd37e56c24db /test/test-execute/exec-specifier@.service
parent__attribute__((fallthrough)) only when -Wimplicit-fallthrough (#7448) (diff)
downloadsystemd-8b3c4b57573727124a065d6dafcfe0b862e08b94.tar.xz
systemd-8b3c4b57573727124a065d6dafcfe0b862e08b94.zip
test-execute: test more % specifiers (#7450)
Diffstat (limited to '')
-rw-r--r--test/test-execute/exec-specifier@.service21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test-execute/exec-specifier@.service b/test/test-execute/exec-specifier@.service
new file mode 100644
index 0000000000..1038f05027
--- /dev/null
+++ b/test/test-execute/exec-specifier@.service
@@ -0,0 +1,21 @@
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/test %n = exec-specifier@foo-bar.service
+ExecStart=/usr/bin/test %N = exec-specifier@foo-bar
+ExecStart=/usr/bin/test %p = exec-specifier
+ExecStart=/usr/bin/test %P = exec/specifier
+ExecStart=/usr/bin/test %i = foo-bar
+ExecStart=/usr/bin/test %I = foo/bar
+ExecStart=/usr/bin/test %f = /foo/bar
+ExecStart=/usr/bin/test %t = /run
+ExecStart=/usr/bin/test %S = /var/lib
+ExecStart=/usr/bin/test %C = /var/cache
+ExecStart=/usr/bin/test %L = /var/log
+ExecStart=/bin/sh -c 'test %u = $$(id -un 0)'
+ExecStart=/usr/bin/test %U = 0
+ExecStart=/bin/sh -c 'test %h = $$(getent passwd 0 | cut -d: -f 6)
+ExecStart=/bin/sh -c 'test %s = $$(getent passwd 0 | cut -d: -f 7)
+ExecStart=/bin/sh -c 'test %m = $$(cat /etc/machine-id)'
+ExecStart=/bin/sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
+ExecStart=/bin/sh -c 'test %H = $$(hostname)'
+ExecStart=/bin/sh -c 'test %v = $$(uname -r)'