public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test t-lvextend-percent-extents.sh
@ 2008-01-17 15:56 wysochanski
  0 siblings, 0 replies; 2+ messages in thread
From: wysochanski @ 2008-01-17 15:56 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-01-17 15:56:54

Modified files:
	test           : t-lvextend-percent-extents.sh 

Log message:
	Minor test fix

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvextend-percent-extents.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3

--- LVM2/test/t-lvextend-percent-extents.sh	2007/09/24 19:19:18	1.2
+++ LVM2/test/t-lvextend-percent-extents.sh	2008/01/17 15:56:53	1.3
@@ -67,7 +67,7 @@
 # Exercise the range overlap code.  Allocate every 2 extents.
 #
 #      Physical Extents
-#           1         2
+#          1         2
 #012345678901234567890123
 #
 #aaXXaaXXaaXXaaXXaaXXaaXX - (a)llocated
@@ -88,7 +88,8 @@
   'Reset LV to 12 extents, allocate every other 2 extents' \
   'create_pvs=`for i in $(seq 0 4 20); do echo -n "\$d1:$i-$(($i + 1)) "; done` &&
    lvremove -f $vg/$lv; test $? = 0 &&
-   lvcreate -l 12 -n $lv $vg $create_pvs; test $? = 0'
+   lvcreate -l 12 -n $lv $vg $create_pvs; test $? = 0 &&
+   check_lv_size_ $vg/$lv "48.00M"'
 
 test_expect_success \
   'lvextend with partially allocated PVs and extents 100%PVS with PE ranges' \


^ permalink raw reply	[flat|nested] 2+ messages in thread

* LVM2/test t-lvextend-percent-extents.sh
@ 2009-05-11  3:37 wysochanski
  0 siblings, 0 replies; 2+ messages in thread
From: wysochanski @ 2009-05-11  3:37 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-05-11 03:37:34

Modified files:
	test           : t-lvextend-percent-extents.sh 

Log message:
	Add test for seg_start, seg_count, seg_start_pe

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvextend-percent-extents.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7

--- LVM2/test/t-lvextend-percent-extents.sh	2008/11/11 15:46:15	1.6
+++ LVM2/test/t-lvextend-percent-extents.sh	2009/05/11 03:37:34	1.7
@@ -80,3 +80,22 @@
 grep "^  Logical volume $lv successfully resized\$" out 
 check_lv_field_ $vg/$lv lv_size "72.00M"
 
+# Simple seg_count validation; initially create the LV with half the # of
+# extents (should be 1 lv segment), extend it (should go to 2 segments),
+# then reduce (should be back to 1)
+# FIXME: test other segment fields such as seg_size, pvseg_start, pvseg_size
+lvremove -f $vg/$lv
+pe_count=$(pvs -o pv_pe_count --noheadings $dev1)
+pe1=$(( $pe_count / 2 ))
+lvcreate -l $pe1 -n $lv $vg
+pesize=$(lvs -ovg_extent_size --units b --nosuffix --noheadings $vg/$lv)
+segsize=$(( $pe1 * $pesize / 1024 / 1024 ))M
+check_lv_field_ $vg/$lv seg_count 1
+check_lv_field_ $vg/$lv seg_start 0
+check_lv_field_ $vg/$lv seg_start_pe 0
+#check_lv_field_ $vg/$lv seg_size $segsize
+lvextend -l +$(( $pe_count * 1 )) $vg/$lv
+check_lv_field_ $vg/$lv seg_count 2
+lvreduce -f -l -$(( $pe_count * 1 )) $vg/$lv
+check_lv_field_ $vg/$lv seg_count 1
+


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-11  3:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17 15:56 LVM2/test t-lvextend-percent-extents.sh wysochanski
2009-05-11  3:37 wysochanski

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).