]> sourceware.org Git - lvm2.git/commitdiff
Add coverage test for partition table scanning
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 20 Oct 2010 15:14:13 +0000 (15:14 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 20 Oct 2010 15:14:13 +0000 (15:14 +0000)
test/t-test-partition.sh [new file with mode: 0644]
test/test-utils.sh

diff --git a/test/t-test-partition.sh b/test/t-test-partition.sh
new file mode 100644 (file)
index 0000000..45a0aba
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Copyright (C) 2010 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
+
+#
+# Testcase for bugzilla #621173 
+# excercises partition table scanning code path
+#
+
+which sfdisk || exit 200
+
+LVM_TEST_CONFIG_DEVICES="types = [\"device-mapper\", 142]"
+
+. ./test-utils.sh
+
+aux prepare_pvs 1 30
+
+pvs
+
+# create small partition table
+echo "1 2" | sfdisk $dev1
+
+pvs
index c7bd8f684309ab164d65f348d3e5163246d9278c..15994ae15262b4372009bc390edaf19f0c75765c 100644 (file)
@@ -370,6 +370,7 @@ prepare_lvmconf() {
     cache_dir = "$TESTDIR/etc"
     sysfs_scan = 0
     default_data_alignment = 1
+    $LVM_TEST_CONFIG_DEVICES
   }
   log {
     syslog = 0
This page took 0.042561 seconds and 5 git commands to generate.