public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test t-vgcreate-usage.sh
@ 2008-08-28 11:09 mbroz
0 siblings, 0 replies; 3+ messages in thread
From: mbroz @ 2008-08-28 11:09 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2008-08-28 11:09:58
Modified files:
test : t-vgcreate-usage.sh
Log message:
add vgcreate rejects repeated invocation test
add vgcreate fails when the only pv has --metadatacopies 0 test
(by Jaroslav Stava)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgcreate-usage.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4
--- LVM2/test/t-vgcreate-usage.sh 2008/04/10 01:06:48 1.3
+++ LVM2/test/t-vgcreate-usage.sh 2008/08/28 11:09:58 1.4
@@ -18,15 +18,19 @@
{
test -n "$d1" && losetup -d "$d1"
test -n "$d2" && losetup -d "$d2"
- rm -f "$f1" "$f2"
+ test -n "$d3" && losetup -d "$d3"
+ rm -f "$f1" "$f2" "$f3"
}
test_expect_success \
'set up temp files, loopback devices, PVs, vgname' \
'f1=$(pwd)/1 && d1=$(loop_setup_ "$f1") &&
f2=$(pwd)/2 && d2=$(loop_setup_ "$f2") &&
+ f3=$(pwd)/3 && d3=$(loop_setup_ "$f3") &&
vg=$(this_test_)-test-vg-$$ &&
- pvcreate $d1 $d2'
+ pvcreate $d1 $d2 &&
+ pvcreate --metadatacopies 0 $d3
+'
lv=vgcreate-usage-$$
@@ -79,13 +83,31 @@
status=$?; echo status=$status; test $status = 3 &&
grep "New volume group name \"$vg\" is invalid\$" err'
-# FIXME: Not sure why this fails
-#test_expect_success \
-# 'vgcreate rejects MaxLogicalVolumes > 255' \
-# 'vgcreate --metadatatype 1 --maxlogicalvolumes 1024 $vg $d1 $d2 2>err;
-# cp err save;
-# status=$?; echo status=$status; test $status = 3 &&
-# grep "^ Number of volumes may not exceed 255\$" err'
+test_expect_success \
+ 'cleanup vg name' '
+ vg=$(this_test_)-test-vg-$$
+'
+
+test_expect_success \
+ "vgcreate rejects repeated invocation (run 2 times)" '
+ vgcreate $vg $d1 $d2 && {
+ vgcreate $vg $d1 $d2;
+ status=$?; echo status=$status; test $status = 5 &&
+ vgremove -ff $vg
+ }
+'
+
+test_expect_success \
+ 'vgcreate rejects MaxLogicalVolumes > 255' \
+ 'vgcreate --metadatatype 1 --maxlogicalvolumes 1024 $vg $d1 $d2 2>err;
+ status=$?; echo status=$status; test $status = 3 &&
+ grep "^ Number of volumes may not exceed 255\$" err'
+
+test_expect_success \
+ "vgcreate fails when the only pv has --metadatacopies 0" '
+ vgcreate $vg $d3;
+ status=$?; echo status=$status; test $status = 5
+'
test_done
# Local Variables:
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2/test t-vgcreate-usage.sh
@ 2009-07-09 8:50 wysochanski
0 siblings, 0 replies; 3+ messages in thread
From: wysochanski @ 2009-07-09 8:50 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-07-09 08:50:55
Modified files:
test : t-vgcreate-usage.sh
Log message:
Update t-vgcreate-usage.sh to check for default vg properties.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgcreate-usage.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8
--- LVM2/test/t-vgcreate-usage.sh 2009/05/08 05:15:52 1.7
+++ LVM2/test/t-vgcreate-usage.sh 2009/07/09 08:50:55 1.8
@@ -69,9 +69,6 @@
# Test default (4MB) vg_extent_size as well as limits of extent_size
not vgcreate --physicalextentsize 0K $vg $dev1 $dev2
-vgcreate $vg $dev1 $dev2
-check_vg_field_ $vg vg_extent_size 4.00M
-vgremove -ff $vg
vgcreate --physicalextentsize 1K $vg $dev1 $dev2
check_vg_field_ $vg vg_extent_size 1.00K
vgremove -ff $vg
@@ -79,3 +76,11 @@
not vgcreate --physicalextentsize 1024T $vg $dev1 $dev2
#not vgcreate --physicalextentsize 1T $vg $dev1 $dev2
# FIXME: vgcreate allows physicalextentsize larger than pv size!
+
+# Test default max_lv, max_pv, extent_size, alloc_policy, clustered
+vgcreate $vg $dev1 $dev2
+check_vg_field_ $vg vg_extent_size 4.00M
+check_vg_field_ $vg max_lv 0
+check_vg_field_ $vg max_pv 0
+check_vg_field_ $vg vg_attr "wz--n-"
+vgremove -ff $vg
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2/test t-vgcreate-usage.sh
@ 2009-05-08 5:15 wysochanski
0 siblings, 0 replies; 3+ messages in thread
From: wysochanski @ 2009-05-08 5:15 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2009-05-08 05:15:52
Modified files:
test : t-vgcreate-usage.sh
Log message:
Add tests to check vgcreate --physicalextentsize and field vg_extent_size.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgcreate-usage.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7
--- LVM2/test/t-vgcreate-usage.sh 2008/11/10 12:43:35 1.6
+++ LVM2/test/t-vgcreate-usage.sh 2009/05/08 05:15:52 1.7
@@ -66,3 +66,16 @@
#COMM "vgcreate fails when the only pv has --metadatacopies 0"
not vgcreate $vg $dev3
+
+# Test default (4MB) vg_extent_size as well as limits of extent_size
+not vgcreate --physicalextentsize 0K $vg $dev1 $dev2
+vgcreate $vg $dev1 $dev2
+check_vg_field_ $vg vg_extent_size 4.00M
+vgremove -ff $vg
+vgcreate --physicalextentsize 1K $vg $dev1 $dev2
+check_vg_field_ $vg vg_extent_size 1.00K
+vgremove -ff $vg
+not vgcreate --physicalextentsize 3K $vg $dev1 $dev2
+not vgcreate --physicalextentsize 1024T $vg $dev1 $dev2
+#not vgcreate --physicalextentsize 1T $vg $dev1 $dev2
+# FIXME: vgcreate allows physicalextentsize larger than pv size!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-09 8:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-28 11:09 LVM2/test t-vgcreate-usage.sh mbroz
2009-05-08 5:15 wysochanski
2009-07-09 8:50 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).