]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wait for loopback device being ready to manipulate
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 17 Mar 2022 11:32:50 +0000 (20:32 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 17 Mar 2022 16:11:12 +0000 (16:11 +0000)
Follow-up for 6626ea08f6db3c050b5e05fa760cf0e371862173.

src/partition/test-repart.sh

index d50a79a15e17a3c6389fa3a8026bbca2941befe3..178379312748ad06ba87ab407b09ac8f8623da7f 100755 (executable)
@@ -199,6 +199,11 @@ $D/zzz7 : start=     6291416, size=       98304, type=0FC63DAF-8483-4772-8E79-3D
 EOF
 
     LOOP="$(losetup -P --show --find "$D/zzz")"
+    while : ; do
+        test -e "$LOOP" && break
+        sleep .2
+    done
+
     VOLUME="test-repart-$RANDOM"
 
     touch "$D/empty-password"