diff options
Diffstat (limited to '')
14 files changed, 89 insertions, 1 deletions
diff --git a/test/testsuite-07.units/issue14566-repro.service b/test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service index 5680596..757f978 100644 --- a/test/testsuite-07.units/issue14566-repro.service +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service @@ -3,6 +3,6 @@ Description=Issue 14566 Repro [Service] -ExecStart=/usr/lib/systemd/tests/testdata/testsuite-07.units/%N.sh +ExecStart=/usr/lib/systemd/tests/testdata/TEST-07-PID1.units/%N.sh ExecStopPost=/bin/true KillMode=mixed diff --git a/test/testsuite-07.units/issue14566-repro.sh b/test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh index 74fa760..74fa760 100755 --- a/test/testsuite-07.units/issue14566-repro.sh +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh diff --git a/test/testsuite-07.units/issue16115-repro-1.service b/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-1.service index 90252b3..90252b3 100644 --- a/test/testsuite-07.units/issue16115-repro-1.service +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-1.service diff --git a/test/testsuite-07.units/issue16115-repro-2.service b/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-2.service index 7c65691..7c65691 100644 --- a/test/testsuite-07.units/issue16115-repro-2.service +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-2.service diff --git a/test/testsuite-07.units/issue16115-repro-3.service b/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-3.service index c68f93d..c68f93d 100644 --- a/test/testsuite-07.units/issue16115-repro-3.service +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue16115-repro-3.service diff --git a/test/testsuite-07.units/issue2467.service b/test/TEST-07-PID1/TEST-07-PID1.units/issue2467.service index 99d886f..99d886f 100644 --- a/test/testsuite-07.units/issue2467.service +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue2467.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue2467.socket b/test/TEST-07-PID1/TEST-07-PID1.units/issue2467.socket new file mode 100644 index 0000000..209b6bb --- /dev/null +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue2467.socket @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Socket] +ListenStream=/run/test.ctl +# We might not be fast enough to hit the default limit (20 triggers per 2 secs) +# in certain environments, i.e. when running without KVM or when collecting +# coverage. Let's help it a bit in such cases by lowering the limit to 10 seconds. +TriggerLimitIntervalSec=10 diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue2730-alias.mount b/test/TEST-07-PID1/TEST-07-PID1.units/issue2730-alias.mount new file mode 120000 index 0000000..802f026 --- /dev/null +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue2730-alias.mount @@ -0,0 +1 @@ +issue2730.mount
\ No newline at end of file diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/issue2730.mount b/test/TEST-07-PID1/TEST-07-PID1.units/issue2730.mount new file mode 100644 index 0000000..2ac76c0 --- /dev/null +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue2730.mount @@ -0,0 +1,8 @@ +[Mount] +What=tmpfs +Where=/issue2730 +Type=tmpfs + +[Install] +WantedBy=local-fs.target +Alias=issue2730-alias.mount diff --git a/test/testsuite-07.units/issue27953.service b/test/TEST-07-PID1/TEST-07-PID1.units/issue27953.service index f441067..f441067 100644 --- a/test/testsuite-07.units/issue27953.service +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue27953.service diff --git a/test/testsuite-07.units/issue3166-fail-on-restart.service b/test/TEST-07-PID1/TEST-07-PID1.units/issue3166-fail-on-restart.service index b8695d8..b8695d8 100644 --- a/test/testsuite-07.units/issue3166-fail-on-restart.service +++ b/test/TEST-07-PID1/TEST-07-PID1.units/issue3166-fail-on-restart.service diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/local-fs.target.wants/issue2730.mount b/test/TEST-07-PID1/TEST-07-PID1.units/local-fs.target.wants/issue2730.mount new file mode 120000 index 0000000..70a8534 --- /dev/null +++ b/test/TEST-07-PID1/TEST-07-PID1.units/local-fs.target.wants/issue2730.mount @@ -0,0 +1 @@ +../issue2730.mount
\ No newline at end of file diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-no.socket b/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-no.socket new file mode 100644 index 0000000..8b7964b --- /dev/null +++ b/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-no.socket @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Unit] +Description=Test if ExecXYZ= commands don't inherit listen FDs when PassFileDescriptorsToExec= is unset + +[Socket] +# With Accept= set we don't need a corresponding service unit +Accept=yes +FileDescriptorName=foo +ListenStream=127.0.0.1:1234 +ListenStream=[::1]:1234 +PassFileDescriptorsToExec=no +ExecStartPre=\ + test ExecStartPre -a \ + -z ${LISTEN_FDS} -a \ + -z ${LISTEN_FDNAMES} -a \ + ! -e /dev/fd/3 -a \ + ! -e /dev/fd/4 +ExecStartPost=\ + test ExecStartPost -a \ + -z ${LISTEN_FDS} -a \ + -z ${LISTEN_FDNAMES} -a \ + ! -e /dev/fd/3 -a \ + ! -e /dev/fd/4 +ExecStopPre=\ + test ExecStopPre -a \ + -z ${LISTEN_FDS} -a \ + -z ${LISTEN_FDNAMES} -a \ + ! -e /dev/fd/3 -a \ + ! -e /dev/fd/4 +ExecStopPost=\ + test ExecStopPost -a \ + -z ${LISTEN_FDS} -a \ + -z ${LISTEN_FDNAMES} -a \ + ! -e /dev/fd/3 -a \ + ! -e /dev/fd/4 diff --git a/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-yes.socket b/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-yes.socket new file mode 100644 index 0000000..bff192d --- /dev/null +++ b/test/TEST-07-PID1/TEST-07-PID1.units/pass-fds-to-exec-yes.socket @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Unit] +Description=Test if ExecXYZ= commands inherit listen FDs when PassFileDescriptorsToExec= is set + +[Socket] +# With Accept= set we don't need a corresponding service unit +Accept=yes +FileDescriptorName=foo +ListenStream=127.0.0.1:1234 +ListenStream=[::1]:1234 +PassFileDescriptorsToExec=yes +# ExecStartPre runs before we create sockets. Nothing to pass. +ExecStartPre=\ + test ExecStartPre -a \ + -z ${LISTEN_FDS} -a \ + -z ${LISTEN_FDNAMES} -a \ + ! -e /dev/fd/3 -a \ + ! -e /dev/fd/4 +ExecStartPost=\ + test ExecStartPost -a \ + ${LISTEN_FDS} = 2 -a \ + ${LISTEN_FDNAMES} = foo:foo -a \ + -S /dev/fd/3 -a \ + -S /dev/fd/4 +ExecStopPre=\ + test "ExecStopPre" -a \ + ${LISTEN_FDS} = 2 -a \ + ${LISTEN_FDNAMES} = foo:foo -a \ + -S /dev/fd/3 -a \ + -S /dev/fd/4 +ExecStopPost=\ + test "ExecStopPost" -a \ + ${LISTEN_FDS} = 2 -a \ + ${LISTEN_FDNAMES} = foo:foo -a \ + -S /dev/fd/3 -a \ + -S /dev/fd/4 |