Skip to content

Commit

Permalink
test: restart logind and test
Browse files Browse the repository at this point in the history
Restarting journald and dbus also causes problems for systemd-logind, so
restart it too and test with loginctl

Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Sep 13, 2024
1 parent 176c89e commit 54d5763
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/tests_imuxsock_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
done
# dbus needs to be restarted after journald or services will not be able to
# listen for dbus
for service in dbus dbus-broker; do
for service in dbus dbus-broker systemd-logind; do
if systemctl is-active "$service"; then
systemctl restart "$service" || { systemctl status "$service" || :; journalctl -ex; }
fi
Expand All @@ -140,6 +140,8 @@
logger tests_imuxsock_files_ensure_journal_working
sleep 1
journalctl -ex | grep tests_imuxsock_files_ensure_journal_working
# ensure loginctl is working - if not it will error with a timeout
loginctl list-sessions
changed_when: true
vars:
__journald_units:
Expand Down

0 comments on commit 54d5763

Please sign in to comment.