1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: skip unneeded status check

If 'remove' was succesful - we can break loop immediatelly.
This commit is contained in:
Zdenek Kabelac 2019-11-08 13:12:31 +01:00
parent 1cc1333599
commit ba313ac84a

View File

@ -52,11 +52,10 @@ wait
j=0 j=0
for i in $lv1 pvmove0 pvmove0_mimage_0 pvmove0_mimage_1 ; do for i in $lv1 pvmove0 pvmove0_mimage_0 pvmove0_mimage_1 ; do
while dmsetup status "$vg-$i" ; do while dmsetup status "$vg-$i" ; do
dmsetup remove "$vg-$i" || { dmsetup remove "$vg-$i" && break
j=$(( j + 1 )) j=$(( j + 1 ))
test $j -le 100 || die "Cannot take down devices." test $j -le 100 || die "Cannot take down devices."
sleep .1; sleep .1;
}
done done
done done
dmsetup table | grep $PREFIX dmsetup table | grep $PREFIX