From: Zdenek Kabelac Date: Tue, 11 Jun 2019 14:40:44 +0000 (+0200) Subject: tests: correct checked target name X-Git-Tag: v2_03_05~8 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=c9203a6106c7f9d66d7872e5709f5e02d246c0e3;p=lvm2.git tests: correct checked target name So when the target name happened to be a suffix of another one, the grep was filtering incorrect line (i.e. dm-cache && dm-writecache) - so do a line head matching. --- diff --git a/test/lib/aux.sh b/test/lib/aux.sh index b178ab75b..040c8f287 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -1421,7 +1421,7 @@ target_at_least() { fi local version - version=$(dmsetup targets 2>/dev/null | grep "${1##dm-} " 2>/dev/null) + version=$(dmsetup targets 2>/dev/null | grep "^${1##dm-} " 2>/dev/null) version=${version##* v} version_at_least "$version" "${@:2}" || {