summaryrefslogtreecommitdiffstats
path: root/test/shell/mirror-vgreduce-removemissing.sh
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-03-28 11:10:08 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-03-28 11:10:08 +0000
commita59c3731c3f68561b1b9aa015d59155976c7a6a3 (patch)
tree8a19c221b29f6c4df02442db518088c4406e6659 /test/shell/mirror-vgreduce-removemissing.sh
parent9e072e70723544190b5fbfbfae9e6683fcf5f644 (diff)
downloadlvm2-a59c3731c3f68561b1b9aa015d59155976c7a6a3.tar.gz
lvm2-a59c3731c3f68561b1b9aa015d59155976c7a6a3.tar.xz
lvm2-a59c3731c3f68561b1b9aa015d59155976c7a6a3.zip
Improve test suite
Add make help target. Add LVM_TEST_PARALLEL to support parallel runs of tests Work around the problem the dmsetup table/info may return error by using dmtable and dminfo function that will use 'should'. (Error happens when some concurently running process removes table entry while dmsetup command resolves table entries inside the loop.)
Diffstat (limited to 'test/shell/mirror-vgreduce-removemissing.sh')
-rw-r--r--test/shell/mirror-vgreduce-removemissing.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/shell/mirror-vgreduce-removemissing.sh b/test/shell/mirror-vgreduce-removemissing.sh
index 5bab0c9d..232c2be3 100644
--- a/test/shell/mirror-vgreduce-removemissing.sh
+++ b/test/shell/mirror-vgreduce-removemissing.sh
@@ -93,20 +93,15 @@ aux prepare_vg 5
prepare_lvs_()
{
- lvremove -ff $vg;
- if (dmsetup table | grep -v -- "-missing_" | grep $vg); then
+ lvremove -ff $vg
+ (dm_table | not grep $vg) || \
die "ERROR: lvremove did leave some some mappings in DM behind!"
- fi
- :
}
check_and_cleanup_lvs_()
{
lvs -a -o+devices $vg
- lvremove -ff $vg
- if (dmsetup table | grep $vg); then
- die "ERROR: lvremove did leave some some mappings in DM behind!"
- fi
+ prepare_lvs_
}
recover_vg_()