test: use the new `udevadm wait` verb to wait for the loop device
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 4 Apr 2022 13:58:03 +0000 (15:58 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 4 Apr 2022 13:58:03 +0000 (15:58 +0200)
commitc189d3bd788950484d13fb5529976601495d077f
tree761d7c4dfb2dfcf5675f72dd51f06142f6ef1d54
parente4f92a62a83a20b6992615b0bb595b97f67481da
test: use the new `udevadm wait` verb to wait for the loop device

 The original workaround didn't work, as `systemd-repart` kept failing
 even when the `/dev/loopX` device was present:

 ```
 [   13.959419] H testsuite-58.sh[280]: + LOOP=/dev/loop1
 [   13.959636] H testsuite-58.sh[280]: + :
 [   13.959764] H testsuite-58.sh[280]: + test -e /dev/loop1
 [   13.959895] H testsuite-58.sh[280]: + break
 [   13.960023] H testsuite-58.sh[280]: + systemd-repart --pretty=yes --definitions=/tmp/testsuite-58-sector/ --seed=750b6cd5c4ae4012a15e7be3c29e6a47 --empty=require --dry-run=no /dev/loop1
 [   13.970538] H testsuite-58.sh[363]: Device '/dev/loop1' has no dm-crypt/dm-verity device, no need to look for underlying block device.
 [   13.970538] H testsuite-58.sh[363]: Failed to determine canonical path for '/dev/loop1': No such file or directory
 [   13.970538] H testsuite-58.sh[363]: Failed to open file or determine backing device of /dev/loop1: No such file or directory
 ```
test/units/testsuite-58.sh