Skip to contentSkip to conversation

master - TEST: Replace old sync test/wait functions with new library functions

PATCH Jonathan Brassow 1 participant 1 message Jul 24, 2012

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=407198e17dc805dd9ce0583c8b1dbade71572af6
Commit:        407198e17dc805dd9ce0583c8b1dbade71572af6
Parent:        753cb9204d24ceb4d9f8184ceb4c0262b9aacb42
Author:        Jonathan Brassow <[email protected]>
AuthorDate:    Tue Jul 24 14:20:30 2012 -0500
Committer:     Jonathan Brassow <[email protected]>
CommitterDate: Tue Jul 24 14:20:30 2012 -0500

TEST: Replace old sync test/wait functions with new library functions

Generic sync test/wait functions have replaced the old mirror/raid functions.

---
 test/shell/lvconvert-mirror.sh |   10 ++----
 test/shell/lvconvert-raid.sh   |   74 ++++-----------------------------------
 test/shell/lvcreate-raid.sh    |   47 ++-----------------------
 3 files changed, 15 insertions(+), 116 deletions(-)
test/shell/lvconvert-mirror.sh +3 -7
index 3f572e5..4d587d9 100644
@@ -11,10 +11,6 @@
 
 . lib/test
 
-wait_for_mirror_in_sync_() {
-	while test $(get lv_field $1 copy_percent) != "100.00"; do sleep 1; done
-}
-
 aux prepare_pvs 5 10
 # FIXME - test fails with extent size < 512k
 vgcreate -c n -s 512k $vg $(cat DEVICES)
@@ -93,7 +89,7 @@ should not lvconvert -m-1 $vg/$lv1 "$dev1"
 lvconvert $vg/$lv1 # wait
 lvconvert -m2 $vg/$lv1 "$dev1" "$dev2" "$dev4" "$dev3:0" # If the above "should" failed...
 
-wait_for_mirror_in_sync_ $vg/$lv1
+aux wait_for_sync $vg $lv1
 lvconvert -m-1 $vg/$lv1 "$dev1"
 check mirror_images_on $lv1 "$dev2" "$dev4"
 lvconvert -m-1 $vg/$lv1 "$dev2"
@@ -215,7 +211,7 @@ lvremove -ff $vg
 
 # "rhbz440405: lvconvert -m0 incorrectly fails if all PEs allocated"
 lvcreate -l`pvs --noheadings -ope_count "$dev1"` -m1 -n $lv1 $vg "$dev1" "$dev2" "$dev3:0"
-wait_for_mirror_in_sync_ $vg/$lv1
+aux wait_for_sync $vg $lv1
 lvconvert -m0 $vg/$lv1 "$dev1"
 check linear $vg $lv1
 lvremove -ff $vg
@@ -237,7 +233,7 @@ lvremove -ff $vg
 
 # BZ 463272: disk log mirror convert option is lost if downconvert option is also given
 lvcreate -l1 -m2 --corelog -n $lv1 $vg "$dev1" "$dev2" "$dev3"
-wait_for_mirror_in_sync_ $vg/$lv1
+aux wait_for_sync $vg $lv1
 lvconvert -m1 --mirrorlog disk $vg/$lv1
 check mirror $vg $lv1
 not check mirror $vg $lv1 core
test/shell/lvconvert-raid.sh +8 -66

123 lines not on this page · raw message

test/shell/lvcreate-raid.sh +4 -43

73 lines not on this page · raw message