summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-04-18 15:19:45 -0500
committerDavid Teigland <teigland@redhat.com>2016-04-18 16:56:06 -0500
commitbf1be3b7dc60ad2ba60100d5b154593c631a3bfa (patch)
treeea117d51100c414d39106b78a2454aa4ddae17d1
parentfbbb713690b3ab167bea38bb47b0fab55caf7be1 (diff)
downloadlvm2-bf1be3b7dc60ad2ba60100d5b154593c631a3bfa.tar.gz
test: lvmetad-override
-rw-r--r--test/shell/lvmetad-override.sh32
1 files changed, 27 insertions, 5 deletions
diff --git a/test/shell/lvmetad-override.sh b/test/shell/lvmetad-override.sh
index 0e5690449..cd005fcd1 100644
--- a/test/shell/lvmetad-override.sh
+++ b/test/shell/lvmetad-override.sh
@@ -18,12 +18,34 @@ SKIP_WITH_LVMPOLLD=1
aux prepare_pvs 2
vgcreate $vg1 "$dev1" "$dev2"
-lvchange -ay $vg1 2>&1 | not grep "Failed to connect"
+lvcreate -an -l1 --zero n -n $lv1 $vg1
+
+lvchange -ay $vg1 2>&1 | tee out
+not grep "WARNING: Failed to connect" out
+check active $vg1 $lv1
+lvchange -an $vg1
+check inactive $vg1 $lv1
+
kill $(< LOCAL_LVMETAD)
-lvchange -ay $vg1 2>&1 | grep "Failed to connect"
-lvchange -aay $vg1 --sysinit 2>&1 | not grep "Failed to connect"
-lvchange -ay $vg1 --config 'global { use_lvmetad = 0 }' 2>&1 | not grep "Failed to connect"
+
+lvchange -ay $vg1 2>&1 | tee out
+grep "WARNING: Failed to connect" out
+check active $vg1 $lv1
+lvchange -an $vg1
+check inactive $vg1 $lv1
+
+lvchange -ay --config global/use_lvmetad=0 $vg1 2>&1 | tee out
+not grep "WARNING: Failed to connect" out
+check active $vg1 $lv1
+lvchange -an $vg1
+check inactive $vg1 $lv1
+
aux lvmconf "global/use_lvmetad = 0"
-lvchange -ay $vg1 --config 'global { use_lvmetad = 1 }' 2>&1 | grep "Failed to connect"
+
+lvchange -ay --config global/use_lvmetad=1 $vg1 2>&1 | tee out
+grep "WARNING: Failed to connect" out
+check active $vg1 $lv1
+lvchange -an $vg1
+check inactive $vg1 $lv1
vgremove -ff $vg1