1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: better regex check

Enhance check for matching prefix.
This commit is contained in:
Zdenek Kabelac 2015-10-09 21:30:37 +02:00
parent 2cb1f6eafe
commit 8cc21354c2

View File

@ -30,7 +30,7 @@ COMMON_PREFIX="LVMTEST"
PREFIX="${COMMON_PREFIX}$$"
# Check we are not conflickting with some exiting setup
dmsetup table | not grep "$PREFIX" || die "DM table already has devices with prefix $PREFIX!"
dmsetup table | not grep "${PREFIX}[^0-9]" || die "DM table already has devices with prefix $PREFIX!"
if test -z "$LVM_TEST_DIR"; then LVM_TEST_DIR=$TMPDIR; fi
TESTDIR=$(mkdtemp "${LVM_TEST_DIR:-/tmp}" "$PREFIX.XXXXXXXXXX") || \