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

tests: improve loop

This commit is contained in:
Zdenek Kabelac 2017-07-07 10:10:36 +02:00
parent e68d986cd5
commit 4ed3f1bee3

View File

@ -28,19 +28,17 @@ detect_error_leak_()
{
local err
dmsetup info -c -o name --noheadings | tee out
if grep $vg out ; then
for i in $(grep $vg out) ; do
if dmsetup table $i | grep "error "; then
err="$err $i"
fi
done
test -z "$err" || {
dmsetup table | grep $vg
dmsetup ls --tree
die "Device(s) $err should not be here."
}
fi
for i in $(dmsetup info -c -o name --noheadings) ; do
case "$i" in
"$vg*") (dmsetup table "$i" | grep "error ") && err="$err $i" ;;
esac
done
test -z "$err" || {
dmsetup table | grep $vg
dmsetup ls --tree
die "Device(s) $err should not be here."
}
}
function _lvcreate