From: Yu Watanabe Date: Wed, 22 Dec 2021 07:52:47 +0000 (+0900) Subject: test: wait for user inactive X-Git-Tag: v250~10^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F21858%2Fhead;p=thirdparty%2Fsystemd.git test: wait for user inactive The user may be busy when auto-rebalancing the user's home device. Workaround for #21589. --- Dec 01 15:03:15 H systemd-homework[1078]: Provided password unlocks user record. Dec 01 15:03:15 H systemd-homework[1078]: Image file '/home/test-user.home' already locked, can't use. Dec 01 15:03:15 H systemd-homed[240]: Worker reported error code EADDRINUSE. Dec 01 15:03:15 H systemd-homed[240]: Activation failed: Address already in use --- --- diff --git a/test/units/testsuite-46.sh b/test/units/testsuite-46.sh index d0bedc63d5e..c3e57cec95c 100755 --- a/test/units/testsuite-46.sh +++ b/test/units/testsuite-46.sh @@ -153,13 +153,20 @@ if ! systemd-detect-virt -cq ; then inspect test-user2 fi +wait_for_state test-user inactive PASSWORD=xEhErW0ndafV4s homectl with test-user -- test ! -f /home/test-user/xyz +wait_for_state test-user inactive PASSWORD=xEhErW0ndafV4s homectl with test-user -- test -f /home/test-user/xyz \ && { echo 'unexpected success'; exit 1; } +wait_for_state test-user inactive PASSWORD=xEhErW0ndafV4s homectl with test-user -- touch /home/test-user/xyz +wait_for_state test-user inactive PASSWORD=xEhErW0ndafV4s homectl with test-user -- test -f /home/test-user/xyz +wait_for_state test-user inactive PASSWORD=xEhErW0ndafV4s homectl with test-user -- rm /home/test-user/xyz +wait_for_state test-user inactive PASSWORD=xEhErW0ndafV4s homectl with test-user -- test ! -f /home/test-user/xyz +wait_for_state test-user inactive PASSWORD=xEhErW0ndafV4s homectl with test-user -- test -f /home/test-user/xyz \ && { echo 'unexpected success'; exit 1; }