]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wait for the lodev to get properly initialized
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 23 Aug 2022 12:44:01 +0000 (14:44 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 23 Aug 2022 17:38:43 +0000 (17:38 +0000)
Otherwise we might start writing to one of its partition before the
respective node is created under /dev, resulting in... interesting
stuff.

Resolves: #24390

test/units/testsuite-50.sh

index f2d937daba3a5f8e6776e26da177f234115012db..6170c8ab63fd758059fee9b632e5a98504a3ad0f 100755 (executable)
@@ -187,6 +187,7 @@ if [ "${HAVE_OPENSSL}" -eq 1 ]; then
     sfdisk --part-label "${image}.gpt" 3 "Signature Partition"
 fi
 loop="$(losetup --show -P -f "${image}.gpt")"
+udevadm wait --timeout 60 --settle "${loop:?}"
 dd if="${image}.raw" of="${loop}p1"
 dd if="${image}.verity" of="${loop}p2"
 if [ "${HAVE_OPENSSL}" -eq 1 ]; then