From: Yu Watanabe Date: Fri, 17 May 2024 05:00:12 +0000 (+0900) Subject: test: wait for sessions being closed X-Git-Tag: v256-rc3~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc5112580a0eafe1f4f56ec35522578b7e76bca5;p=thirdparty%2Fsystemd.git test: wait for sessions being closed If a session in closing state, the user state will be in online. Fixes #32698. --- diff --git a/test/units/TEST-35-LOGIN.sh b/test/units/TEST-35-LOGIN.sh index 0f4b770de31..1ad06526e64 100755 --- a/test/units/TEST-35-LOGIN.sh +++ b/test/units/TEST-35-LOGIN.sh @@ -596,7 +596,7 @@ testcase_list_users_sessions_seats() { return fi - assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $4 }')" lingering + timeout 30 bash -c "until [[ \"\$(loginctl list-users --no-legend | awk '\$2 == \"logind-test-user\" { print \$4 }')\" == lingering ]]; do sleep 1; done" } teardown_stop_idle_session() (