public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test t-lvconvert-repair-policy.sh lib/che ...
@ 2011-04-12 12:39 mornfall
  0 siblings, 0 replies; only message in thread
From: mornfall @ 2011-04-12 12:39 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall@sourceware.org	2011-04-12 12:39:25

Modified files:
	test           : t-lvconvert-repair-policy.sh 
	test/lib       : check.sh 

Log message:
	Make the mirror log checks in t-lvconvert-repair-policy a bit more strict
	(i.e. accurate).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-policy.sh.diff?cvsroot=lvm2&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/check.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5

--- LVM2/test/t-lvconvert-repair-policy.sh	2011/02/28 19:44:21	1.9
+++ LVM2/test/t-lvconvert-repair-policy.sh	2011/04/12 12:39:24	1.10
@@ -45,7 +45,7 @@
 aux disable_dev $dev1
 repair 'activation { mirror_image_fault_policy = "replace" mirror_log_fault_policy = "remove" }'
 check mirror $vg mirror
-lvs | grep mirror_mlog
+check active $vg mirror_mlog
 cleanup $dev1
 
 # Fail a leg of a mirror.
@@ -53,7 +53,7 @@
 aux disable_dev $dev1
 repair 'activation { mirror_image_fault_policy = "replace" }'
 check mirror $vg mirror
-lvs | grep mirror_mlog
+check active $vg mirror_mlog
 cleanup $dev1
 
 # Fail a leg of a mirror (use old name for policy specification)
@@ -61,7 +61,7 @@
 aux disable_dev $dev1
 repair 'activation { mirror_image_fault_policy = "replace" }'
 check mirror $vg mirror
-lvs | grep mirror_mlog
+check active $vg mirror_mlog
 cleanup $dev1
 
 # Fail a leg of a mirror w/ no available spare
@@ -70,7 +70,7 @@
 aux disable_dev $dev2 $dev4
 repair 'activation { mirror_image_fault_policy = "replace" }'
 check mirror $vg mirror
-lvs | not grep mirror_mlog
+not check lv_exists $vg mirror_mlog
 cleanup $dev2 $dev4
 
 # Fail the log device of a mirror w/ no available spare
@@ -78,7 +78,7 @@
 aux disable_dev $dev3 $dev4
 repair 'activation { mirror_image_fault_policy = "replace" }' $vg/mirror
 check mirror $vg mirror
-lvs | not grep mirror_mlog
+not check lv_exists $vg mirror_mlog
 cleanup $dev3 $dev4
 
 # Fail the log device with a remove policy
@@ -87,5 +87,5 @@
 aux disable_dev $dev3 $dev4
 repair 'activation { mirror_log_fault_policy = "remove" }'
 check mirror $vg mirror core
-lvs | not grep mirror_mlog
+not check lv_exists $vg mirror_mlog
 cleanup $dev3 $dev4
--- LVM2/test/lib/check.sh	2011/01/28 16:08:39	1.4
+++ LVM2/test/lib/check.sh	2011/04/12 12:39:24	1.5
@@ -209,6 +209,14 @@
 	}
 }
 
+lv_exists() {
+	lv="$1/$2"
+	lvl "$lv" >& /dev/null || {
+		echo "$lv expected to exist but does not"
+		exit 1
+	}
+}
+
 pv_field()
 {
     actual=$(trim $(pvs --noheadings $4 -o $2 $1))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-12 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12 12:39 LVM2/test t-lvconvert-repair-policy.sh lib/che mornfall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).