From 8cc21354c2b4cb58223950b7e089eb28e602f0e8 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 9 Oct 2015 21:30:37 +0200 Subject: [PATCH] tests: better regex check Enhance check for matching prefix. --- test/lib/inittest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh index 4ed8d20ae..28bc4e8e6 100644 --- a/test/lib/inittest.sh +++ b/test/lib/inittest.sh @@ -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") || \