]> git.ipfire.org Git - thirdparty/grub.git/commit
grub-fs-tester: Fix losetup race
authorWill Thompson <wjt@endlessm.com>
Fri, 15 Jun 2018 17:34:04 +0000 (18:34 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Sat, 23 Jun 2018 19:39:09 +0000 (21:39 +0200)
commit0083541593e05704961db229aefea0542446c07c
tree381e17335681003329fb051e701bcdab0d7e31a3
parent14ec665c3f36d0614cacaa757907551c5c2e6adb
grub-fs-tester: Fix losetup race

If something else on the system is using loopback devices, then the
device that's free at the call to `losetup -f` may not be free in the
following call to try to use it. Instead, find and use the first free
loopback device in a single call to losetup.

Signed-off-by: Will Thompson <wjt@endlessm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/util/grub-fs-tester.in