summaryrefslogtreecommitdiff
path: root/test/test-execute/exec-readonlypaths-mount-propagation.service
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2016-09-25 19:50:25 +0200
committerDjalal Harouni <tixxdz@opendz.org>2016-09-27 09:24:46 +0200
commitcdfbd1fb26eb75fe6beca47dce7e5e348b077d97 (patch)
treead3ca0d54fbca6fad4d58ee47d0d69b972849466 /test/test-execute/exec-readonlypaths-mount-propagation.service
parentf78b36f016b5f3e6ce1dfbdfcb78ba227ff8ccac (diff)
test: make sure that {readonly|inaccessible|readwrite}paths disconnect mount propagation
Better safe.
Diffstat (limited to 'test/test-execute/exec-readonlypaths-mount-propagation.service')
-rw-r--r--test/test-execute/exec-readonlypaths-mount-propagation.service7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test-execute/exec-readonlypaths-mount-propagation.service b/test/test-execute/exec-readonlypaths-mount-propagation.service
new file mode 100644
index 0000000000..237cbb2efb
--- /dev/null
+++ b/test/test-execute/exec-readonlypaths-mount-propagation.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Test to make sure that passing ReadOnlyPaths= disconnect mount propagation
+
+[Service]
+ReadOnlyPaths=-/i-dont-exist
+ExecStart=/bin/sh -x -c 'mkdir -p /TEST; mount -t tmpfs tmpfs /TEST; grep TEST /proc/self/mountinfo && ! grep TEST /proc/$${PPID}/mountinfo && ! grep TEST /proc/1/mountinfo'
+Type=oneshot