summaryrefslogtreecommitdiffstats
path: root/test/test-execute/exec-readonlypaths-simple.service
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-12-05 16:36:55 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2017-12-05 16:36:55 +0100
commitf0e018e748cd48b8959160b160fdd85827afd5bf (patch)
treefc2f61dc90e3992d0bbf2795bf7ebefa39a7a466 /test/test-execute/exec-readonlypaths-simple.service
parentMerge pull request #7529 from vcaputo/trivial-style-fixups (diff)
downloadsystemd-f0e018e748cd48b8959160b160fdd85827afd5bf.tar.xz
systemd-f0e018e748cd48b8959160b160fdd85827afd5bf.zip
test-execute: cleanup
This makes rename the test units by a consistent naming scheme, add several logs, and sort internal functions. No functional change.
Diffstat (limited to 'test/test-execute/exec-readonlypaths-simple.service')
-rw-r--r--test/test-execute/exec-readonlypaths-simple.service11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-execute/exec-readonlypaths-simple.service b/test/test-execute/exec-readonlypaths-simple.service
new file mode 100644
index 0000000000..a9a715905c
--- /dev/null
+++ b/test/test-execute/exec-readonlypaths-simple.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Test for ReadOnlyPaths=
+
+[Service]
+Type=oneshot
+# This should work, as we explicitly disable the effect of ReadOnlyPaths=
+ExecStart=+/bin/sh -c 'touch /tmp/thisisasimpletest'
+# This should also work, as we do not disable the effect of ReadOnlyPaths= but invert the exit code
+ExecStart=/bin/sh -x -c '! touch /tmp/thisisasimpletest'
+ExecStart=+/bin/sh -c 'rm /tmp/thisisasimpletest'
+ReadOnlyPaths=/tmp