public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: mbroz@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/test t-vgreduce-usage.sh
Date: Thu, 28 Aug 2008 11:20:00 -0000	[thread overview]
Message-ID: <20080828112049.1776.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2008-08-28 11:20:49

Modified files:
	test           : t-vgreduce-usage.sh 

Log message:
	fix vgreduce tests to detect partial command failure (Jaroslav Stava)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgreduce-usage.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2

--- LVM2/test/t-vgreduce-usage.sh	2008/08/12 10:04:31	1.1
+++ LVM2/test/t-vgreduce-usage.sh	2008/08/28 11:20:49	1.2
@@ -35,28 +35,39 @@
    lv2=$(this_test_)-test-lv2-$$          &&
    lv3=$(this_test_)-test-lv3-$$'
 
+#TODO --removemissing (+ -- mirrorsonly)
 
 for mdatype in 1 2
 do
 test_expect_success \
   "(lvm$mdatype) setup PVs" '
-  pvcreate -M$mdatype $d1 $d2 
+   pvcreate -M$mdatype $d1 $d2 
 '
 
 test_expect_success \
-  "(lvm$mdatype) vgreduce rejects removing the last pv (--all)" '
+  "(lvm$mdatype) vgreduce removes only the specified pv from vg (bz427382)" '
    vgcreate -M$mdatype $vg1 $d1 $d2 &&
-   vgreduce --all $vg1  2>err;
+   vgreduce $vg1 $d1 &&
+   check_pv_field_ $d2 vg_name $vg1 &&
    vgremove -f $vg1
 '
-   #status=$?; echo status=$status; test $status = 5 &&
+
+test_expect_success \
+  "(lvm$mdatype) vgreduce rejects removing the last pv (--all)" '
+   vgcreate -M$mdatype $vg1 $d1 $d2 &&
+   { vgreduce --all $vg1;
+     status=$?; echo status=$status; test $status != 0 &&
+     vgremove -f $vg1
+   }
+'
 
 test_expect_success \
   "(lvm$mdatype) vgreduce rejects removing the last pv" '
    vgcreate -M$mdatype $vg1 $d1 $d2 &&
-   vgreduce $vg1 $d1 $d2 2>err;
-   status=$?; echo status=$status; test $status = 5 &&
-   vgremove -f $vg1
+   { vgreduce $vg1 $d1 $d2;
+     status=$?; echo status=$status; test $status = 5 &&
+     vgremove -f $vg1
+   }
 '
 
 test_expect_success \
@@ -65,21 +76,21 @@
 '
 done
 
-## TODO --mirrorsonly ?
 for mdatype in 2
 do
 test_expect_success \
   "(lvm$mdatype) setup PVs (--metadatacopies 0)" '
-  pvcreate -M$mdatype $d1 $d2 
+  pvcreate -M$mdatype $d1 $d2 &&
   pvcreate --metadatacopies 0 -M$mdatype $d3 $d4
 '
 
 test_expect_success \
   "(lvm$mdatype) vgreduce rejects removing pv with the last mda copy" '
    vgcreate -M$mdatype $vg1 $d1 $d3 &&
-   vgreduce $vg1 $d1 2>err;
-   status=$?; echo status=$status; test $status != 0 &&
-   vgremove -f $vg1
+   { vgreduce $vg1 $d1;
+     status=$?; echo status=$status; test $status != 0 &&
+     vgremove -f $vg1
+   }
 '
 done
 


             reply	other threads:[~2008-08-28 11:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28 11:20 mbroz [this message]
2008-09-19 16:12 mbroz
2008-09-30 17:17 mornfall
2011-07-04 16:27 agk
2011-07-11 12:13 mornfall

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=20080828112049.1776.qmail@sourceware.org \
    --to=mbroz@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).