mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
test logind restart
Add a simple check which ensures that a user service survives a logind restart.
This commit is contained in:
committed by
Yu Watanabe
parent
4dba936a03
commit
3ad3ee8e54
@@ -785,6 +785,20 @@ testcase_varlink() {
|
||||
varlinkctl introspect /run/systemd/io.systemd.Login
|
||||
}
|
||||
|
||||
testcase_restart() {
|
||||
local UNIT
|
||||
|
||||
UNIT=user-sleeper.service
|
||||
|
||||
systemd-run --service-type=notify run0 -u logind-test-user --unit="$UNIT" sleep infinity
|
||||
systemctl restart systemd-logind
|
||||
|
||||
systemctl --quiet is-active "$UNIT"
|
||||
loginctl | grep logind-test-user | grep -qw background
|
||||
|
||||
systemctl kill "$UNIT"
|
||||
}
|
||||
|
||||
setup_test_user
|
||||
test_write_dropin
|
||||
run_testcases
|
||||
|
||||
Reference in New Issue
Block a user