Skip to contentSkip to conversation

dev-dct-process-latest - test: add process-each toollib tests

PATCH David Teigland 1 participant 1 message Sep 22, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b141a65e668de93784a2e8afc0e16ed35faf6960
Commit:        b141a65e668de93784a2e8afc0e16ed35faf6960
Parent:        437bcc5abe67c97da965403b699f2ed1a54af40a
Author:        David Teigland <[email protected]>
AuthorDate:    Fri Aug 30 15:48:53 2013 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Mon Sep 22 10:32:24 2014 -0500

test: add process-each toollib tests

---
 test/shell/process-each-pv-nomda-all.sh |   60 ++
 test/shell/process-each-pv-nomda.sh     |   27 +
 test/shell/process-each-pv.sh           | 1285 +++++++++++++++++++++++++++++++
 test/shell/process-each-pvresize.sh     |  561 ++++++++++++++
 4 files changed, 1933 insertions(+), 0 deletions(-)
test/shell/process-each-pv-nomda-all.sh new file +60 -0
new file mode 100644
index 0000000..ae9f8e5
@@ -0,0 +1,60 @@
+#!/bin/sh
+# Copyright (C) 2008-2013 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
+
+test_description='Test process_each_pv with zero mda'
+
+. lib/inittest
+
+aux prepare_devs 14
+
+# for vg1
+pvcreate $dev10
+
+# for vg2
+pvcreate $dev2 --metadatacopies 0
+pvcreate $dev3
+pvcreate $dev4
+pvcreate $dev5
+
+# for vg3
+pvcreate $dev6 --metadatacopies 0
+pvcreate $dev7 --metadatacopies 0
+pvcreate $dev8 --metadatacopies 0
+pvcreate $dev9
+
+# orphan with mda
+pvcreate "$dev11"
+# orphan without mda
+pvcreate "$dev14" --metadatacopies 0
+
+# non-pv devs
+# dev12
+# dev13
+
+vgcreate $vg1 "$dev10"
+vgcreate $vg2 "$dev2" "$dev3" "$dev4" "$dev5"
+vgcreate $vg3 "$dev6" "$dev7" "$dev8" "$dev9"
+
+pvs -a >err
+grep $dev10 err
+grep $dev2 err
+grep $dev3 err
+grep $dev4 err
+grep $dev5 err
+grep $dev6 err
+grep $dev7 err
+grep $dev8 err
+grep $dev9 err
+grep $dev11 err
+grep $dev12 err
+grep $dev13 err
+grep $dev14 err
+
test/shell/process-each-pv-nomda.sh new file +27 -0
new file mode 100644
index 0000000..10ce878
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (C) 2008-2013 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
+
+test_description='Test process_each_pv with zero mda'
+
+. lib/inittest
+
+aux prepare_devs 2
+
+pvcreate $dev1 --metadatacopies 0
+pvcreate $dev2
+
+vgcreate $vg1 "$dev1" "$dev2"
+
+pvdisplay -a -C >err
+cat err
+grep $dev1 err
+grep $dev2 err
+
test/shell/process-each-pv.sh new file +1285 -0

1,285 lines not on this page · raw message

test/shell/process-each-pvresize.sh new file +561 -0

561 lines not on this page · raw message