From: Yu Watanabe Date: Thu, 17 Mar 2022 11:32:50 +0000 (+0900) Subject: test: wait for loopback device being ready to manipulate X-Git-Tag: v251-rc1~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7ee9b35514ea823903c377a25827d54af95f0a8;p=thirdparty%2Fsystemd.git test: wait for loopback device being ready to manipulate Follow-up for 6626ea08f6db3c050b5e05fa760cf0e371862173. --- diff --git a/src/partition/test-repart.sh b/src/partition/test-repart.sh index d50a79a15e1..17837931274 100755 --- a/src/partition/test-repart.sh +++ b/src/partition/test-repart.sh @@ -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"