Skip to contentSkip to conversation

master - TEST: Test RAID syncaction, writemostly, & refresh under snapshots

PATCH Jonathan Brassow 1 participant 1 message Jun 20, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bdcfe8c6de26472562a8f907081e0eb94e038488
Commit:        bdcfe8c6de26472562a8f907081e0eb94e038488
Parent:        8215846aa52b727c3c639d9b354d611319be26c6
Author:        Jonathan Brassow <[email protected]>
AuthorDate:    Thu Jun 20 11:48:15 2013 -0500
Committer:     Jonathan Brassow <[email protected]>
CommitterDate: Thu Jun 20 11:48:15 2013 -0500

TEST: Test RAID syncaction, writemostly, & refresh under snapshots

Test the different RAID lvchange scenarios under snapshot as well.

This patch also updates calculations for where to write to an underlying PV when testing various syncactions.

---
 test/lib/check.sh           |    8 +++--
 test/shell/lvchange-raid.sh |   68 ++++++++++++++++++++++++++++++++++---------
 2 files changed, 59 insertions(+), 17 deletions(-)
test/lib/check.sh +5 -3
index 6cb33ac..8db0c65 100644
@@ -158,6 +158,7 @@ in_sync() {
 	local b
 	local idx
 	local type
+	local snap=""
 	local lvm_name="$1/$2"
 	local dm_name=$(echo $lvm_name | sed s:-:--: | sed s:/:-:)
 
@@ -167,6 +168,7 @@ in_sync() {
 		if ! a=(`dmsetup status ${dm_name}-real`); then
 			die "Unable to get sync status of $1"
 		fi
+		snap=": under snapshot"
 	fi
 
 	if [ ${a[2]} = "raid" ]; then
@@ -184,15 +186,15 @@ in_sync() {
 	b=( $(echo ${a[$idx]} | sed s:/:' ':) )
 
 	if [ ${b[0]} != ${b[1]} ]; then
-		echo "$lvm_name ($type) is not in-sync"
+		echo "$lvm_name ($type$snap) is not in-sync"
 		return 1
 	fi
 
 	if [[ ${a[$(($idx - 1))]} =~ a ]]; then
-		die "$lvm_name in-sync, but 'a' characters in health status"
+		die "$lvm_name ($type$snap) in-sync, but 'a' characters in health status"
 	fi
 
-	echo "$lvm_name ($type) is in-sync"
+	echo "$lvm_name ($type$snap) is in-sync"
 	return 0
 }
 
test/shell/lvchange-raid.sh +54 -14

146 lines not on this page · raw message