public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test t-pvcreate-operation.sh
@ 2008-07-24 17:33 wysochanski
0 siblings, 0 replies; 5+ messages in thread
From: wysochanski @ 2008-07-24 17:33 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2008-07-24 17:33:40
Modified files:
test : t-pvcreate-operation.sh
Log message:
Add pvcreate tests for uuid and restorefile.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3
--- LVM2/test/t-pvcreate-operation.sh 2008/07/21 18:50:10 1.2
+++ LVM2/test/t-pvcreate-operation.sh 2008/07/24 17:33:40 1.3
@@ -80,6 +80,33 @@
"pvcreate (lvm2) fails writing LVM label at sector 4" \
'pvcreate --labelsector 4 $d1'
+backupfile=mybackupfile-$(this_test_)
+uuid1=freddy-fred-fred-fred-fred-fred-freddy
+uuid2=freddy-fred-fred-fred-fred-fred-fredie
+bogusuuid=fred
+
+test_expect_failure \
+ 'pvcreate rejects uuid option with less than 32 characters' \
+ 'pvcreate --uuid $bogusuuid $d1'
+
+test_expect_success \
+ 'pvcreate rejects uuid already in use' \
+ 'pvcreate --uuid freddy-fred-fred-fred-fred-fred-freddy $d1 &&
+ pvcreate --uuid freddy-fred-fred-fred-fred-fred-freddy $d2;
+ status=$?; echo status=$status; test $status != 0'
+
+test_expect_success \
+ 'pvcreate rejects non-existent file given with restorefile' \
+ 'pvcreate --uuid $uuid1 --restorefile $backupfile $d1;
+ status=$?; echo status=$status; test $status != 0'
+
+test_expect_success \
+ 'pvcreate rejects restorefile with uuid not found in file' \
+ 'pvcreate --uuid $uuid1 $d1 &&
+ vgcfgbackup -f $backupfile &&
+ pvcreate --uuid $uuid2 --restorefile $backupfile $d2;
+ status=$?; echo status=$status; test $status != 0'
+
test_done
# Local Variables:
# indent-tabs-mode: nil
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2/test t-pvcreate-operation.sh
@ 2010-02-22 14:47 mornfall
0 siblings, 0 replies; 5+ messages in thread
From: mornfall @ 2010-02-22 14:47 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2010-02-22 14:47:56
Modified files:
test : t-pvcreate-operation.sh
Log message:
Relax a check on blkid exit value, which seems to be different in different
versions. Fixes a spurious test failure introduced with -o pipefail.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.16&r2=1.17
--- LVM2/test/t-pvcreate-operation.sh 2009/06/06 16:40:39 1.16
+++ LVM2/test/t-pvcreate-operation.sh 2010/02/22 14:47:55 1.17
@@ -114,4 +114,5 @@
mkswap $dev1
blkid -c /dev/null $dev1 | grep "swap"
pvcreate -f $dev1
-blkid -c /dev/null $dev1 | not grep "swap"
+# blkid cannot make up its mind whether not finding anything it knows is a failure or not
+(blkid -c /dev/null $dev1 || true) | not grep "swap"
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2/test t-pvcreate-operation.sh
@ 2008-12-16 20:02 mbroz
0 siblings, 0 replies; 5+ messages in thread
From: mbroz @ 2008-12-16 20:02 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2008-12-16 20:02:52
Modified files:
test : t-pvcreate-operation.sh
Log message:
Remove status=noxfer from test, not all dd versions support this (RHEL4 for example).
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.13&r2=1.14
--- LVM2/test/t-pvcreate-operation.sh 2008/11/11 15:46:15 1.13
+++ LVM2/test/t-pvcreate-operation.sh 2008/12/16 20:02:52 1.14
@@ -82,7 +82,7 @@
do
# pvcreate (lvm2) succeeds writing LVM label at sector $i
pvcreate --labelsector $i $dev1
- dd if=$dev1 bs=512 skip=$i count=1 status=noxfer 2>&1 | strings | grep -q LABELONE;
+ dd if=$dev1 bs=512 skip=$i count=1 2>/dev/null | strings | grep -q LABELONE;
pvremove -f $dev1
done
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2/test t-pvcreate-operation.sh
@ 2008-08-01 15:44 zkabelac
0 siblings, 0 replies; 5+ messages in thread
From: zkabelac @ 2008-08-01 15:44 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2008-08-01 15:44:55
Modified files:
test : t-pvcreate-operation.sh
Log message:
disable mdadm test-case until a better solution is found
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8
--- LVM2/test/t-pvcreate-operation.sh 2008/07/29 21:05:10 1.7
+++ LVM2/test/t-pvcreate-operation.sh 2008/08/01 15:44:53 1.8
@@ -55,14 +55,14 @@
pvremove -f $d1'
# NOTE: Force pvcreate after test completion to ensure clean device
-test_expect_success \
- "pvcreate (lvm$mdatype) fails on md component device" \
- 'mdadm -C -l raid0 -n 2 /dev/md0 $d1 $d2 &&
- pvcreate -M$mdatype $d1;
- status=$?; echo status=$status; test $status != 0 &&
- mdadm --stop /dev/md0 &&
- pvcreate -ff -y -M$mdatype $d1 $d2 &&
- pvremove -f $d1 $d2'
+#test_expect_success \
+# "pvcreate (lvm$mdatype) fails on md component device" \
+# 'mdadm -C -l raid0 -n 2 /dev/md0 $d1 $d2 &&
+# pvcreate -M$mdatype $d1;
+# status=$?; echo status=$status; test $status != 0 &&
+# mdadm --stop /dev/md0 &&
+# pvcreate -ff -y -M$mdatype $d1 $d2 &&
+# pvremove -f $d1 $d2'
done
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2/test t-pvcreate-operation.sh
@ 2008-07-21 18:50 wysochanski
0 siblings, 0 replies; 5+ messages in thread
From: wysochanski @ 2008-07-21 18:50 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski@sourceware.org 2008-07-21 18:50:10
Modified files:
test : t-pvcreate-operation.sh
Log message:
Add more pvcreate tests to validate writing lvm2 label using --labelsector.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2
--- LVM2/test/t-pvcreate-operation.sh 2008/07/17 03:17:01 1.1
+++ LVM2/test/t-pvcreate-operation.sh 2008/07/21 18:50:10 1.2
@@ -66,6 +66,20 @@
pvremove -f $d2 &&
pvremove -f $d1'
+for i in 0 1 2 3
+do
+ test_expect_success \
+ "pvcreate (lvm2) succeeds writing LVM label at sector $i" \
+ 'pvcreate --labelsector $i $d1 &&
+ dd if=$d1 bs=512 skip=$i count=1 status=noxfer 2>&1 | strings | grep -q LABELONE;
+ test $? == 0 &&
+ pvremove -f $d1'
+done
+
+test_expect_failure \
+ "pvcreate (lvm2) fails writing LVM label at sector 4" \
+ 'pvcreate --labelsector 4 $d1'
+
test_done
# Local Variables:
# indent-tabs-mode: nil
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-22 14:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-24 17:33 LVM2/test t-pvcreate-operation.sh wysochanski
-- strict thread matches above, loose matches on Subject: below --
2010-02-22 14:47 mornfall
2008-12-16 20:02 mbroz
2008-08-01 15:44 zkabelac
2008-07-21 18: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).