mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
test: add test cases for issue #26839 in TEST-03-JOBS
This commit is contained in:
parent
48cb073db8
commit
5db456d065
@ -0,0 +1,5 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Requires=sleep-infinity-simple.service
|
||||
After=sleep-infinity-simple.service
|
||||
PropagatesStopTo=sleep-infinity-simple.service
|
3
test/testsuite-03.units/propagatestopto-only.target
Normal file
3
test/testsuite-03.units/propagatestopto-only.target
Normal file
@ -0,0 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
PropagatesStopTo=sleep-infinity-simple.service
|
7
test/testsuite-03.units/sleep-infinity-simple.service
Normal file
7
test/testsuite-03.units/sleep-infinity-simple.service
Normal file
@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Sleep infinitely
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/bin/sleep infinity
|
@ -3,6 +3,9 @@
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
# shellcheck source=test/units/util.sh
|
||||
. "$(dirname "$0")"/util.sh
|
||||
|
||||
# Simple test for that daemon-reexec works in container.
|
||||
# See: https://github.com/systemd/systemd/pull/23883
|
||||
systemctl daemon-reexec
|
||||
@ -127,4 +130,19 @@ for i in {0..19}; do
|
||||
systemctl start "transaction-cycle$i.service"
|
||||
done
|
||||
|
||||
# Test PropagatesStopTo= when restart (issue #26839)
|
||||
systemctl start propagatestopto-and-pullin.target
|
||||
systemctl --quiet is-active propagatestopto-and-pullin.target
|
||||
|
||||
systemctl restart propagatestopto-and-pullin.target
|
||||
systemctl --quiet is-active propagatestopto-and-pullin.target
|
||||
systemctl --quiet is-active sleep-infinity-simple.service
|
||||
|
||||
systemctl start propagatestopto-only.target
|
||||
systemctl --quiet is-active propagatestopto-only.target
|
||||
systemctl --quiet is-active sleep-infinity-simple.service
|
||||
|
||||
systemctl restart propagatestopto-only.target
|
||||
assert_rc 3 systemctl --quiet is-active sleep-infinity-simple.service
|
||||
|
||||
touch /testok
|
||||
|
Loading…
Reference in New Issue
Block a user