From a338e0acb43cc33725f1b9b6037bb3111c758868 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 12 Sep 2024 11:15:04 -0600 Subject: [PATCH] test: restart logind and test Restarting journald and dbus also causes problems for systemd-logind, so restart it too and test with loginctl Signed-off-by: Rich Megginson --- tests/tests_imuxsock_files.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tests_imuxsock_files.yml b/tests/tests_imuxsock_files.yml index 2e527a98..31460f2a 100644 --- a/tests/tests_imuxsock_files.yml +++ b/tests/tests_imuxsock_files.yml @@ -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 @@ -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: