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-000-basic.sh test/t-pvcreate-opera ... Date: Tue, 29 Jul 2008 21:05:00 -0000 [thread overview] Message-ID: <20080729210523.13824.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@sourceware.org 2008-07-29 21:05:20 Modified files: test : t-000-basic.sh t-pvcreate-operation.sh tools : pvcreate.c Log message: Add pvcreate tests to verify failure on md array detection. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-000-basic.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvcreate.c.diff?cvsroot=lvm2&r1=1.73&r2=1.74 --- LVM2/test/t-000-basic.sh 2007/12/05 09:49:08 1.2 +++ LVM2/test/t-000-basic.sh 2008/07/29 21:05:02 1.3 @@ -32,4 +32,9 @@ 'ensure they are the same' \ 'diff -u actual expected' +# Need mdadm for some pvcreate tests +test_expect_success \ + 'verify mdadm is installed and in path (needed for pvcreate tests)' \ + 'which mdadm' + test_done --- LVM2/test/t-pvcreate-operation.sh 2008/07/25 14:59:51 1.6 +++ LVM2/test/t-pvcreate-operation.sh 2008/07/29 21:05:10 1.7 @@ -54,6 +54,16 @@ pvremove -f $d2 && 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' + done test_expect_success \ --- LVM2/tools/pvcreate.c 2008/07/25 14:59:51 1.73 +++ LVM2/tools/pvcreate.c 2008/07/29 21:05:20 1.74 @@ -106,6 +106,9 @@ return 0; } + /* + * This test will fail if the device belongs to an MD array. + */ if (!dev_test_excl(dev)) { /* FIXME Detect whether device-mapper itself is still using it */ log_error("Can't open %s exclusively. Mounted filesystem?",
reply other threads:[~2008-07-29 21:05 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=20080729210523.13824.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: linkBe 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).