GNU logs - #15353, boring messages


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#15353: [PATCH 12/19] tests: rewrite t6001 to use /dev/mapper
Resent-From: "Brian C. Lane" <bcl@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Wed, 11 Sep 2013 20:17:03 +0000
Resent-Message-ID: <handler.15353.B.137893061716669 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 15353
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: patch
To: 15353 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-parted@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.137893061716669
          (code B ref -1); Wed, 11 Sep 2013 20:17:03 +0000
Received: (at submit) by debbugs.gnu.org; 11 Sep 2013 20:16:57 +0000
Received: from localhost ([127.0.0.1]:56509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VJqqO-0004Kn-SJ
	for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:16:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46598)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bcl@HIDDEN>) id 1VJqqM-0004KX-SA
 for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:16:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqqC-00027U-Nd
 for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:16:49 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59106)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqqC-00027Q-KC
 for submit <at> debbugs.gnu.org; Wed, 11 Sep 2013 16:16:44 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48251)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqq7-0003Ht-Ve
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 16:16:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqq1-00024t-0l
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 16:16:38 -0400
Received: from neil.brianlane.com ([24.113.37.65]:44100
 helo=lister.brianlane.com) by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1VJqpz-0000sS-Uo
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 16:16:32 -0400
Received: from lister.brianlane.com (localhost [127.0.0.1])
 by lister.brianlane.com (8.14.7/8.14.7) with ESMTP id r8BJPIhh015322
 for <bug-parted@HIDDEN>; Wed, 11 Sep 2013 12:25:18 -0700
Received: (from bcl@localhost)
 by lister.brianlane.com (8.14.7/8.14.7/Submit) id r8BJPIOu015321
 for bug-parted@HIDDEN; Wed, 11 Sep 2013 12:25:18 -0700
From: "Brian C. Lane" <bcl@HIDDEN>
Date: Wed, 11 Sep 2013 12:25:02 -0700
Message-Id: <1378927509-15215-13-git-send-email-bcl@HIDDEN>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1378927509-15215-1-git-send-email-bcl@HIDDEN>
References: <1378927509-15215-1-git-send-email-bcl@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

From: "Brian C. Lane" <bcl@HIDDEN>

This test began failing because using a private copy of /dev/mapper
confuses the system. This fixes that and generally cleans up the test.

tests/t6001.sh: update to use /dev/mapper directly
---
 tests/t6001-psep.sh | 42 +++++++++++++++++-------------------------
 1 file changed, 17 insertions(+), 25 deletions(-)

diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh
index da6b8a1..809ff9e 100644
--- a/tests/t6001-psep.sh
+++ b/tests/t6001-psep.sh
@@ -19,10 +19,7 @@
 . "${srcdir=.}/init.sh"; path_prepend_ ../parted
 
 require_root_
-lvm_init_root_dir_
-
-test "x$ENABLE_DEVICE_MAPPER" = xyes \
-  || skip_ "no device-mapper support"
+(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
 
 # Device maps names - should be random to not conflict with existing ones on
 # the system
@@ -41,25 +38,19 @@ cleanup_fn_() {
     rm -f "$f1 $f2";
 }
 
-# create a file of size N bytes
-N=10M
-
-f1=$(pwd)/1; d1=$(loop_setup_ "$f1") \
-  || skip_ "is this partition mounted with 'nodev'?"
+loop_file_1=loop-file-1-$$
+loop_file_2=loop-file-2-$$
 
-f2=$(pwd)/2 ;d2=$(loop_setup_ "$f2") \
-  || skip_ "is this partition mounted with 'nodev'?"
+d1=$(loop_setup_ $loop_file_1) || framework_failure
+d1_size=$(blockdev --getsz $d1)
+d2=$(loop_setup_ $loop_file_2) || framework_failure
+d2_size=$(blockdev --getsz $d2)
 
-dmsetup_cmd="0 `blockdev --getsz $d1` linear $d1 0"
-# setup: create a mapping
-echo "$dmsetup_cmd" | dmsetup create "$linear_" || fail=1
-dev="$DM_DEV_DIR/mapper/$linear_"
+dmsetup create $linear_ --table "0 $d1_size linear $d1 0" || framework_failure
+dev="/dev/mapper/$linear_"
 
 # Create msdos partition table
-parted -s $dev mklabel msdos > out 2>&1 || fail=1
-compare /dev/null out || fail=1
-
-parted -s $dev mkpart primary fat32 1m 5m > out 2>&1 || fail=1
+parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1
 compare /dev/null out || fail=1
 
 #make sure device name is correct
@@ -67,17 +58,18 @@ test -e ${dev}p1 || fail=1
 
 #repeat on name not ending in a digit
 # setup: create a mapping
-echo "$dmsetup_cmd" | dmsetup create "$linear2_" || fail=1
-dev="$DM_DEV_DIR/mapper/$linear2_"
+dmsetup create $linear2_ --table "0 $d2_size linear $d2 0" || framework_failure
+dev="/dev/mapper/$linear2_"
 
 # Create msdos partition table
-parted -s $dev mklabel msdos > out 2>&1 || fail=1
-compare /dev/null out || fail=1
-
-parted -s $dev mkpart primary fat32 1m 5m > out 2>&1 || fail=1
+parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1
 compare /dev/null out || fail=1
 
 #make sure device name is correct
 test -e ${dev}1 || fail=1
 
+if [ -n "$fail" ]; then
+    ls /dev/mapper
+fi
+
 Exit $fail
-- 
1.8.3.1





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: "Brian C. Lane" <bcl@HIDDEN>
Subject: bug#15353: Acknowledgement ([PATCH 12/19] tests: rewrite t6001 to
 use /dev/mapper)
Message-ID: <handler.15353.B.137893061716669.ack <at> debbugs.gnu.org>
References: <1378927509-15215-13-git-send-email-bcl@HIDDEN>
X-Gnu-PR-Message: ack 15353
X-Gnu-PR-Package: parted
X-Gnu-PR-Keywords: patch
Reply-To: 15353 <at> debbugs.gnu.org
Date: Wed, 11 Sep 2013 20:17:04 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-parted@HIDDEN

If you wish to submit further information on this problem, please
send it to 15353 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
15353: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15353
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.