summaryrefslogtreecommitdiffstats
path: root/src/partition
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-17 12:32:50 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2022-03-17 17:11:12 +0100
commitb7ee9b35514ea823903c377a25827d54af95f0a8 (patch)
treeceea20f75be0dfe9bcbed11c8d811874b3480602 /src/partition
parentupdate TODO (diff)
downloadsystemd-b7ee9b35514ea823903c377a25827d54af95f0a8.tar.xz
systemd-b7ee9b35514ea823903c377a25827d54af95f0a8.zip
test: wait for loopback device being ready to manipulate
Follow-up for 6626ea08f6db3c050b5e05fa760cf0e371862173.
Diffstat (limited to 'src/partition')
-rwxr-xr-xsrc/partition/test-repart.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/partition/test-repart.sh b/src/partition/test-repart.sh
index d50a79a15e..1783793127 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"