From a60e991ee7bdc102bb1e039f6652faf8a1ee71fd Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 20 Oct 2010 15:14:13 +0000 Subject: [PATCH] Add coverage test for partition table scanning --- test/t-test-partition.sh | 30 ++++++++++++++++++++++++++++++ test/test-utils.sh | 1 + 2 files changed, 31 insertions(+) create mode 100644 test/t-test-partition.sh diff --git a/test/t-test-partition.sh b/test/t-test-partition.sh new file mode 100644 index 000000000..45a0aba6c --- /dev/null +++ b/test/t-test-partition.sh @@ -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 diff --git a/test/test-utils.sh b/test/test-utils.sh index c7bd8f684..15994ae15 100644 --- a/test/test-utils.sh +++ b/test/test-utils.sh @@ -370,6 +370,7 @@ prepare_lvmconf() { cache_dir = "$TESTDIR/etc" sysfs_scan = 0 default_data_alignment = 1 + $LVM_TEST_CONFIG_DEVICES } log { syslog = 0 -- 2.43.5