test: wait for loopback device being ready to manipulate

Follow-up for 6626ea08f6.
This commit is contained in:
Yu Watanabe
2022-03-17 16:11:12 +00:00
committed by Luca Boccassi
parent 63a185dc72
commit b7ee9b3551
+5
View File
@@ -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"