summaryrefslogtreecommitdiff
path: root/test/test-execute/exec-read-only-path-succeed.service
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-execute/exec-read-only-path-succeed.service')
-rw-r--r--test/test-execute/exec-read-only-path-succeed.service8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test-execute/exec-read-only-path-succeed.service b/test/test-execute/exec-read-only-path-succeed.service
new file mode 100644
index 0000000000..b54d48f281
--- /dev/null
+++ b/test/test-execute/exec-read-only-path-succeed.service
@@ -0,0 +1,8 @@
+[Service]
+Type=oneshot
+# This should work, as we explicitly disable the effect of ReadOnlyPaths=
+ExecStart=+/bin/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 '! /bin/touch /tmp/thisisasimpletest'
+ExecStart=+/bin/rm /tmp/thisisasimpletest
+ReadOnlyPaths=/tmp