summaryrefslogtreecommitdiff
path: root/test/test-execute/exec-runtimedirectory-owner-nobody.service
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-03-02 15:55:02 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-03-02 16:42:53 +0900
commit69b0740785d5f664f0f183f68bb8a772fdfcd191 (patch)
tree4b0094c2fcf121c88bbe06cf6514db8fc10b9ce8 /test/test-execute/exec-runtimedirectory-owner-nobody.service
parentd2f95a223f8b4323b69e1f2873e619c728b8ad81 (diff)
downloadsystemd-69b0740785d5f664f0f183f68bb8a772fdfcd191.tar.gz
test-execute: add tests with user/group daemon
The nobody user/group may not synthesized by systemd. To run tests the functionalities in such situation, this adds tests by user/group by daemon, as it is expected to exists all environments.
Diffstat (limited to 'test/test-execute/exec-runtimedirectory-owner-nobody.service')
-rw-r--r--test/test-execute/exec-runtimedirectory-owner-nobody.service9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test-execute/exec-runtimedirectory-owner-nobody.service b/test/test-execute/exec-runtimedirectory-owner-nobody.service
new file mode 100644
index 0000000000..54782f9bbd
--- /dev/null
+++ b/test/test-execute/exec-runtimedirectory-owner-nobody.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set)
+
+[Service]
+ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nobody"'
+Type=oneshot
+Group=nobody
+User=root
+RuntimeDirectory=test-exec_runtimedirectory-owner