LVM2/test t-mirror-basic.sh t-mirror-lvconvert ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2008-11-10 12:32:00
Modified files:
test : t-mirror-basic.sh t-mirror-lvconvert.sh
t-mirror-names.sh t-mirror-vgreduce-removemissing.sh t-pvmove-basic.sh
Log message:
Explicitly check after lvremove -ff vg that it did its job. By jstava.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-basic.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-lvconvert.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-names.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-vgreduce-removemissing.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvmove-basic.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3
test/t-mirror-basic.sh +8 -0
@@ -121,6 +121,10 @@ prepare_lvs_() { lvremove -ff $vg; + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi : }
@@ -128,6 +132,10 @@ { lvs -a -o+devices $vg lvremove -ff $vg + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi } #COMM "check environment setup/cleanup"
test/t-mirror-lvconvert.sh +9 -0
@@ -111,12 +111,21 @@ prepare_lvs_() { lvremove -ff $vg + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi + : } check_and_cleanup_lvs_() { lvs -a -o+devices $vg lvremove -ff $vg + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi } prepare_lvs_
test/t-mirror-names.sh +9 -1
@@ -57,13 +57,21 @@ # Common environment setup/cleanup for each sub testcases prepare_lvs_() { - lvremove -ff $vg; + lvremove -ff $vg + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi : } check_and_cleanup_lvs_() { lvs -a -o+devices $vg lvremove -ff $vg + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi } prepare_lvs_
test/t-mirror-vgreduce-removemissing.sh +8 -0
@@ -94,6 +94,10 @@ prepare_lvs_() { lvremove -ff $vg; + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi : }
@@ -101,6 +105,10 @@ { lvs -a -o+devices $vg lvremove -ff $vg + if dmsetup table|grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" + return 1 + fi } recover_vg_()
test/t-pvmove-basic.sh +5 -0
@@ -84,6 +84,11 @@ check_dev_sum_ $(lvdev_ $vg $lv3) lvs -a -o name $vg > out && ! grep ^pvmove out lvremove -ff $vg + if ! dmsetup table|not grep $vg; then + echo "ERROR: lvremove did leave some some mappings in DM behind!" && + return 1 + fi + : } #COMM "check environment setup/cleanup"