1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

tests: do not break teardown on failing losetup

Ignore failing 'losetup -d' - i.e. device may have disappeared...
This commit is contained in:
Zdenek Kabelac 2016-04-01 09:36:23 +02:00
parent 07c25429e2
commit 307ab2c179

View File

@ -431,7 +431,7 @@ teardown_devs() {
test ${#stray_loops[@]} -eq 0 || {
teardown_devs_prefixed "$COMMON_PREFIX" 1
echo "Removing stray loop devices containing $COMMON_PREFIX: ${stray_loops[@]}"
for i in "${stray_loops[@]}" ; do test ! -b $i || losetup -d $i ; done
for i in "${stray_loops[@]}" ; do test ! -b $i || losetup -d $i || true ; done
# Leave test when udev processed all removed devices
udev_wait
}