summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-03-16 12:56:29 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-03-16 12:56:29 +0000
commit803b1056ca1b20641952963d2b975d62017255e3 (patch)
treeb4494d1ee7b5b2d9712853e5c1f7d8449e97bc7e /test
parenta9382908ae6ee7fa9df3fb6588ce665b8950a253 (diff)
downloadlvm2-803b1056ca1b20641952963d2b975d62017255e3.tar.gz
lvm2-803b1056ca1b20641952963d2b975d62017255e3.tar.xz
lvm2-803b1056ca1b20641952963d2b975d62017255e3.zip
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_....
Diffstat (limited to 'test')
-rw-r--r--test/lib/aux.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 42f886ad..bc79486c 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -92,8 +92,8 @@ teardown_devs() {
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