From 733b05a69315a25a73c1385540aa0f4192102056 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 28 Jan 2011 16:15:08 +0000 Subject: [PATCH] Lower device size of pvmove test Lower the size of devices in this test for speedup. And check only once that LVs are prepared properly. --- test/t-pvmove-basic.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/test/t-pvmove-basic.sh b/test/t-pvmove-basic.sh index 56e1f9932..89d24e207 100755 --- a/test/t-pvmove-basic.sh +++ b/test/t-pvmove-basic.sh @@ -43,30 +43,34 @@ check_dev_sum_() { # --------------------------------------------------------------------- # Initialize PVs and VGs -aux prepare_vg 5 80 +aux prepare_vg 5 40 # --------------------------------------------------------------------- # Common environment setup/cleanup for each sub testcases +FIRST="" prepare_lvs_() { lvcreate -l2 -n $lv1 $vg $dev1 - lv_is_on_ $vg/$lv1 $dev1 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 lvcreate -l9 -i3 -n $lv2 $vg $dev2 $dev3 $dev4 - lv_is_on_ $vg/$lv2 $dev2 $dev3 $dev4 + test -z "$FIRST" && lv_is_on_ $vg/$lv2 $dev2 $dev3 $dev4 lvextend -l+2 $vg/$lv1 $dev2 - lv_is_on_ $vg/$lv1 $dev1 $dev2 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 $dev2 lvextend -l+2 $vg/$lv1 $dev3 - lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 lvextend -l+2 $vg/$lv1 $dev1 - lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 $dev1 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 $dev1 lvcreate -l1 -n $lv3 $vg $dev2 - lv_is_on_ $vg/$lv3 $dev2 + test -z "$FIRST" && lv_is_on_ $vg/$lv3 $dev2 save_dev_sum_ $(lvdev_ $vg $lv1) save_dev_sum_ $(lvdev_ $vg $lv2) save_dev_sum_ $(lvdev_ $vg $lv3) - lvs -a -o devices --noheadings $vg/$lv1 > ${lv1}_devs - lvs -a -o devices --noheadings $vg/$lv2 > ${lv2}_devs - lvs -a -o devices --noheadings $vg/$lv3 > ${lv3}_devs + if test -z "$FIRST" ; then + lvs -a -o devices --noheadings $vg/$lv1 > ${lv1}_devs + lvs -a -o devices --noheadings $vg/$lv2 > ${lv2}_devs + lvs -a -o devices --noheadings $vg/$lv3 > ${lv3}_devs + fi + FIRST=done } lv_not_changed_() {