mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
tests: improve teardown
Do not try to execute vgremove, when test has left suspended devices.
This commit is contained in:
parent
a220939d9e
commit
8d86c5db03
@ -322,8 +322,12 @@ teardown() {
|
|||||||
dm_table | not egrep -q "$vg|$vg1|$vg2|$vg3|$vg4" || {
|
dm_table | not egrep -q "$vg|$vg1|$vg2|$vg3|$vg4" || {
|
||||||
# Avoid activation of dmeventd if there is no pid
|
# Avoid activation of dmeventd if there is no pid
|
||||||
cfg=$(test -s LOCAL_DMEVENTD || echo "--config activation{monitoring=0}")
|
cfg=$(test -s LOCAL_DMEVENTD || echo "--config activation{monitoring=0}")
|
||||||
vgremove -ff $cfg \
|
if echo "$(dm_info suspended,name)" | grep -q "^Suspended:.*$prefix" ; then
|
||||||
|
echo "Skipping vgremove, suspended devices detected."
|
||||||
|
else
|
||||||
|
vgremove -ff $cfg \
|
||||||
$vg $vg1 $vg2 $vg3 $vg4 &>/dev/null || rm -f debug.log strace.log
|
$vg $vg1 $vg2 $vg3 $vg4 &>/dev/null || rm -f debug.log strace.log
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
kill_sleep_kill_ LOCAL_LVMPOLLD ${LVM_VALGRIND_LVMPOLLD:-0}
|
kill_sleep_kill_ LOCAL_LVMPOLLD ${LVM_VALGRIND_LVMPOLLD:-0}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user