summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-03-28 07:46:35 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2012-03-28 07:46:35 +0000
commit9e072e70723544190b5fbfbfae9e6683fcf5f644 (patch)
tree5eff2656726045c1b67c9ec3f8f49fa0a6224486 /test
parent61a1effcf1c90fb6e3b566c01492c73d17985de0 (diff)
downloadlvm2-9e072e70723544190b5fbfbfae9e6683fcf5f644.tar.gz
lvm2-9e072e70723544190b5fbfbfae9e6683fcf5f644.tar.xz
lvm2-9e072e70723544190b5fbfbfae9e6683fcf5f644.zip
Fix tests to work with vgscan --cache fixing inconsistent metadata.
Diffstat (limited to 'test')
-rw-r--r--test/shell/inconsistent-metadata.sh7
-rw-r--r--test/shell/unlost-pv.sh6
2 files changed, 8 insertions, 5 deletions
diff --git a/test/shell/inconsistent-metadata.sh b/test/shell/inconsistent-metadata.sh
index 60539951..b5ef450d 100644
--- a/test/shell/inconsistent-metadata.sh
+++ b/test/shell/inconsistent-metadata.sh
@@ -32,11 +32,12 @@ check() {
grep resized lvs.out | grep 8192
}
-# vgscan fixes up metadata
+# vgscan fixes up metadata (needs --cache option for direct scan if lvmetad is used)
+test -e LOCAL_LVMETAD && cache="--cache"
init
-vgscan 2>&1 | tee cmd.out
+vgscan $cache 2>&1 | tee cmd.out
grep "Inconsistent metadata found for VG $vg" cmd.out
-vgscan 2>&1 | tee cmd.out
+vgscan $cache 2>&1 | tee cmd.out
not grep "Inconsistent metadata found for VG $vg" cmd.out
check
diff --git a/test/shell/unlost-pv.sh b/test/shell/unlost-pv.sh
index 9f040a32..c7a1412c 100644
--- a/test/shell/unlost-pv.sh
+++ b/test/shell/unlost-pv.sh
@@ -12,9 +12,11 @@
. lib/test
check_() {
- vgscan 2>&1 | tee vgscan.out
+ # vgscan needs --cache option for direct scan if lvmetad is used
+ test -e LOCAL_LVMETAD && cache="--cache"
+ vgscan $cache 2>&1 | tee vgscan.out
grep "Inconsistent metadata found for VG $vg" vgscan.out
- vgscan 2>&1 | tee vgscan.out
+ vgscan $cache 2>&1 | tee vgscan.out
not grep "Inconsistent metadata found for VG $vg" vgscan.out
}