public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: wysochanski@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/test t-vgsplit-operation.sh
Date: Wed, 09 Apr 2008 21:10:00 -0000	[thread overview]
Message-ID: <20080409211013.6627.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-04-09 21:10:13

Modified files:
	test           : t-vgsplit-operation.sh 

Log message:
	Add vgsplit tests to verify mirror is not moved unnecessarily.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgsplit-operation.sh.diff?cvsroot=lvm2&r1=1.16&r2=1.17

--- LVM2/test/t-vgsplit-operation.sh	2008/04/09 20:56:06	1.16
+++ LVM2/test/t-vgsplit-operation.sh	2008/04/09 21:10:13	1.17
@@ -20,7 +20,8 @@
   test -n "$d2" && losetup -d "$d2"
   test -n "$d3" && losetup -d "$d3"
   test -n "$d4" && losetup -d "$d4"
-  rm -f "$f1" "$f2" "$f3" "$f4"
+  test -n "$d5" && losetup -d "$d5"
+  rm -f "$f1" "$f2" "$f3" "$f4" "$f5"
 }
 
 vg_validate_pvlv_counts_()
@@ -44,12 +45,13 @@
    f2=$(pwd)/2 && d2=$(loop_setup_ "$f2") &&
    f3=$(pwd)/3 && d3=$(loop_setup_ "$f3") &&
    f4=$(pwd)/4 && d4=$(loop_setup_ "$f4") &&
+   f5=$(pwd)/5 && d5=$(loop_setup_ "$f5") &&
    vg1=$(this_test_)-test-vg1-$$          &&
    vg2=$(this_test_)-test-vg2-$$          &&
    lv1=$(this_test_)-test-lv1-$$          &&
    lv2=$(this_test_)-test-lv2-$$          &&
    lv3=$(this_test_)-test-lv3-$$          &&
-   pvcreate $d1 $d2 $d3 $d4'
+   pvcreate $d1 $d2 $d3 $d4 $d5'
 
 #
 # vgsplit can be done into a new or existing VG
@@ -178,6 +180,33 @@
    vgremove -f $vg1 &&
    vgremove -f $vg2'
 
+test_expect_success \
+  "vgsplit correctly splits linear LV but not mirror LV into $i VG ($j args)" \
+  'vgcreate $vg1 $d1 $d2 $d3 &&
+   if [ $i == existing ]; then
+     vgcreate $vg2 $d5
+   fi &&
+   lvcreate -l 64 -m1 -n $lv1 $vg1 $d1 $d2 $d3 &&
+   vgextend $vg1 $d4 &&
+   lvcreate -l 64 -n $lv2 $vg1 $d4 &&
+   vgchange -an $vg1 &&
+   if [ $j == PV ]; then
+     vgsplit $vg1 $vg2 $d4
+   else
+     vgsplit -n $lv2 $vg1 $vg2
+   fi &&
+   if [ $i == existing ]; then
+     vg_validate_pvlv_counts_ $vg1 3 4 0
+     vg_validate_pvlv_counts_ $vg2 2 1 0
+   else
+     vg_validate_pvlv_counts_ $vg1 3 4 0
+     vg_validate_pvlv_counts_ $vg2 1 1 0
+   fi &&
+   lvremove -f $vg1/$lv1 &&
+   lvremove -f $vg2/$lv2 &&
+   vgremove -f $vg1 &&
+   vgremove -f $vg2'
+
 done
 done
 


             reply	other threads:[~2008-04-09 21:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09 21:10 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-29 16:40 mornfall
2008-09-30 18:29 mornfall
2008-09-30 17:56 mornfall
2008-04-10 18:55 wysochanski
2008-03-21 21:14 wysochanski
2008-03-04 22:49 wysochanski
2008-02-29  0:09 wysochanski
2008-02-28 17:39 wysochanski
2008-02-28 16:48 wysochanski
2008-01-22  3:30 wysochanski

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=20080409211013.6627.qmail@sourceware.org \
    --to=wysochanski@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 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).