test-execute: add test case for PrivateTmp=disconnected
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Test for PrivateTmp=disconnected with After=/Requires=var.mount
|
||||
DefaultDependencies=no
|
||||
After=var.mount
|
||||
Requires=var.mount
|
||||
|
||||
[Service]
|
||||
ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
|
||||
ExecStart=touch /tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=sh -x -c 'test x$$TMPDIR = x'
|
||||
Type=oneshot
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=disconnected
|
||||
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Test for PrivateTmp=disconnected with After=/Wants=var.mount
|
||||
DefaultDependencies=no
|
||||
After=var.mount
|
||||
Wants=var.mount
|
||||
|
||||
[Service]
|
||||
ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
|
||||
ExecStart=touch /tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=sh -x -c 'test x$$TMPDIR = x'
|
||||
Type=oneshot
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=disconnected
|
||||
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Test for PrivateTmp=disconnected with DefaultDependencies=no
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
|
||||
ExecStart=touch /tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=sh -x -c '(! touch /var/tmp/test-exec_privatetmp_disconnected)'
|
||||
ExecStart=sh -x -c 'test $$TMPDIR = /tmp'
|
||||
Type=oneshot
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=disconnected
|
||||
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Test for PrivateTmp=disconnected with RequiresMountsFor=/var/
|
||||
DefaultDependencies=no
|
||||
RequiresMountsFor=/var/
|
||||
|
||||
[Service]
|
||||
ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
|
||||
ExecStart=touch /tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=sh -x -c 'test x$$TMPDIR = x'
|
||||
Type=oneshot
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=disconnected
|
||||
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Test for PrivateTmp=disconnected with WantsMountsFor=/var/
|
||||
DefaultDependencies=no
|
||||
WantsMountsFor=/var/
|
||||
|
||||
[Service]
|
||||
ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
|
||||
ExecStart=touch /tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=sh -x -c 'test x$$TMPDIR = x'
|
||||
Type=oneshot
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=disconnected
|
||||
@@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Test for PrivateTmp=disconnected
|
||||
|
||||
[Service]
|
||||
ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
|
||||
ExecStart=touch /tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
|
||||
ExecStart=sh -x -c 'test x$$TMPDIR = x'
|
||||
Type=oneshot
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=disconnected
|
||||
Reference in New Issue
Block a user