Skip to contentSkip to conversation

master - tests: update lvconvert test

PATCH Zdenek Kabelac 1 participant 1 message May 20, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=205be247689d7be38b4341401516a1881e09c6aa
Commit:        205be247689d7be38b4341401516a1881e09c6aa
Parent:        16424fed543ee6d4841c1e44ba252ae976c28cbb
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue May 20 21:11:11 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue May 20 21:50:29 2014 +0200

tests: update lvconvert test

Split raid test to separate file
Add --yes flag to automated testing

---
 test/shell/lvconvert-thin-raid.sh  |   31 +++++++++++++++++++++++
 test/shell/lvconvert-thin.sh       |   47 ++++++++++++++++--------------------
 test/shell/pvmove-thin-segtypes.sh |    2 +-
 3 files changed, 53 insertions(+), 27 deletions(-)
test/shell/lvconvert-thin-raid.sh new file +31 -0
new file mode 100644
index 0000000..ae3d2ef
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+. lib/test
+
+aux have_thin 1 0 0 || skip
+aux have_raid 1 4 0 || skip
+
+aux prepare_vg 4
+
+# create RAID LVs for data and metadata volumes
+lvcreate -aey --nosync -L10M --type raid1 -m1 -n $lv1 $vg
+lvcreate -aey --nosync -L8M --type raid1 -m1 -n $lv2 $vg
+lvchange -an $vg/$lv1
+
+# conversion fails for internal volumes
+fail lvconvert --thinpool $vg/${lv1}_rimage_0
+fail lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/${lv2}_rimage_0
+
+lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
+
+vgremove -ff $vg
test/shell/lvconvert-thin.sh +21 -26

93 lines not on this page · raw message

test/shell/pvmove-thin-segtypes.sh +1 -1
index 684b3f5..c514bb5 100644
@@ -49,7 +49,7 @@ lvremove -ff $vg
 lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
 lvcreate --type raid1 -m 1 -l 4 -n ${lv1}_raid1_pool $vg "$dev1" "$dev2"
 lvcreate --type raid1 -m 1 -L 2 -n ${lv1}_raid1_meta $vg "$dev1" "$dev2"
-lvconvert --thinpool $vg/${lv1}_raid1_pool \
+lvconvert --yes --thinpool $vg/${lv1}_raid1_pool \
         --poolmetadata ${lv1}_raid1_meta
 lvcreate -T $vg/${lv1}_raid1_pool -V 8 -n $lv1
 check lv_tree_on $vg ${lv1}_foo "$dev1"