]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wait for user inactive 21858/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Dec 2021 07:52:47 +0000 (16:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Dec 2021 08:30:10 +0000 (17:30 +0900)
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
---

test/units/testsuite-46.sh

index d0bedc63d5e2c6737ca494859bb79ca7448f1652..c3e57cec95cac4dc4d034acf067f2aac69183d47 100755 (executable)
@@ -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; }