From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22481 invoked by alias); 16 Mar 2012 12:56:30 -0000 Received: (qmail 22464 invoked by uid 9737); 16 Mar 2012 12:56:30 -0000 Date: Fri, 16 Mar 2012 12:56:00 -0000 Message-ID: <20120316125630.22462.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/test/lib aux.sh Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00113.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2012-03-16 12:56:29 Modified files: test/lib : aux.sh Log message: Allow to use also special prefixed names for test Currently we could not test special prefixes in our test suite. As teardown will not find such device and basicaly busyloops here, as at cannot remove such names. This patch adds possibity to use: vgcreate V_$vg1 $dev Note: you still need to use $PREFIX somewhere in the name. (And of course, it's really bad idea to use $PREFIX (=LVMTEST) for normally used LVs) The only purpose of this patch is to allow testing cluster with special vg names that begins with V_ , P_.... Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.41&r2=1.42 --- LVM2/test/lib/aux.sh 2012/03/06 02:54:31 1.41 +++ LVM2/test/lib/aux.sh 2012/03/16 12:56:29 1.42 @@ -92,8 +92,8 @@ rm -rf $TESTDIR/dev/$PREFIX* init_udev_transaction - while dmsetup table | grep -q ^$PREFIX; do - for s in `dmsetup info -c -o name --noheading | grep ^$PREFIX`; do + while dmsetup table | grep -q $PREFIX; do + for s in `dmsetup info -c -o name --noheading | grep $PREFIX`; do umount -fl $DM_DEV_DIR/mapper/$s >& /dev/null || true dmsetup remove -f $s >& /dev/null || true done