From: mbroz@sourceware.org <mbroz@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/test t-vgrename-usage.sh t-vgsplit-usage.sh
Date: 28 Aug 2008 10:59:10 -0000 [thread overview]
Message-ID: <20080828105910.13179.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2008-08-28 10:59:10
Modified files:
test : t-vgrename-usage.sh t-vgsplit-usage.sh
Log message:
add vgrename by uuid test (Jaroslav Stava)
fix vgsplit rejects last mda copy test (Jaroslav Stava)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgrename-usage.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgsplit-usage.sh.diff?cvsroot=lvm2&r1=1.8&r2=1.9
--- LVM2/test/t-vgrename-usage.sh 2008/01/15 22:56:30 1.1
+++ LVM2/test/t-vgrename-usage.sh 2008/08/28 10:59:10 1.2
@@ -31,7 +31,8 @@
f4=$(pwd)/4 && d4=$(loop_setup_ "$f4") &&
vg1=$(this_test_)-1-$$ &&
vg2=$(this_test_)-2-$$ &&
- pvcreate $d1 $d2 $d3 $d4'
+ pvcreate $d1 $d2 &&
+ pvcreate --metadatacopies 0 $d3 $d4'
test_expect_success \
'vgrename normal operation - rename vg1 to vg2' \
@@ -40,6 +41,16 @@
check_vg_field_ $vg2 vg_name $vg2 &&
vgremove $vg2'
+test_expect_success \
+ "vgrename by uuid (bz231187)" '
+ vgcreate $vg1 $d1 $d3 &&
+ UUID=$(vgs --noheading -o vg_uuid $vg1) &&
+ check_vg_field_ $vg1 vg_uuid $UUID &&
+ vgrename $UUID $vg2 &&
+ check_vg_field_ $vg2 vg_name $vg2 &&
+ vgremove $vg2
+'
+
test_done
# Local Variables:
# indent-tabs-mode: nil
--- LVM2/test/t-vgsplit-usage.sh 2008/08/12 10:01:56 1.8
+++ LVM2/test/t-vgsplit-usage.sh 2008/08/28 10:59:10 1.9
@@ -40,12 +40,11 @@
lv2=$(this_test_)-test-lv2-$$ &&
lv3=$(this_test_)-test-lv3-$$'
-for mdatype in 2
+for mdatype in 1 2
do
test_expect_success \
"(lvm$mdatype) setup PVs" \
- 'pvcreate -M$mdatype $d1 $d2 $d3 $d4 &&
- pvcreate -M$mdatype --metadatacopies 0 $d5'
+ 'pvcreate -M$mdatype $d1 $d2 $d3 $d4'
test_expect_success \
"(lvm$mdatype) vgsplit accepts new vg as destination of split" \
@@ -200,19 +199,24 @@
status=$?; echo status=$status; test $status = 5 &&
vgremove -f $vg2 &&
vgremove -f $vg1'
+done
+
+test_expect_success \
+ "(lvm2) setup PVs" '
+ pvcreate -M$mdatype --metadatacopies 0 $d5'
test_expect_success \
"(lvm2) vgsplit rejects to give away pv with the last mda copy" '
- vgcreate -M$mdatype $vg1 $d5 $d2 &&
+ vgcreate -M2 $vg1 $d5 $d2 &&
lvcreate -l 10 -n $lv1 $vg1 &&
lvchange -an $vg1/$lv1 &&
vg_validate_pvlv_counts_ $vg1 2 1 0 &&
- vgsplit $vg1 $vg2 $d5;
- status=$?; echo status=$status; test $status != 0 &&
- vg_validate_pvlv_counts_ $vg1 2 1 0 &&
- vgremove -ff $vg1
+ { vgsplit $vg1 $vg2 $d5;
+ status=$?; echo status=$status; test $status != 0 &&
+ vg_validate_pvlv_counts_ $vg1 2 1 0 &&
+ vgremove -ff $vg1
+ }
'
-done
test_expect_success \
'(lvm2) vgsplit rejects split because metadata types differ' \
reply other threads:[~2008-08-28 10:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080828105910.13179.qmail@sourceware.org \
--to=mbroz@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.