From d51429254f4e9b17083af0c554aa7045e5ec08bb Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 20 Apr 2018 10:15:14 +0200 Subject: [PATCH] tests: improve mirror_images_redundant Use only passed VG for lvs and avoid 1 extra uneeded use of lvs. --- test/lib/check.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/lib/check.sh b/test/lib/check.sh index ed4f8d724..c79610494 100644 --- a/test/lib/check.sh +++ b/test/lib/check.sh @@ -41,7 +41,6 @@ lvdevices() { mirror_images_redundant() { local vg=$1 local lv="$vg/$2" - lvs -a "$vg" -o+devices for i in $(lvdevices "$lv"); do echo "# $i:" lvdevices "$vg/$i" | sort | uniq @@ -158,7 +157,7 @@ mirror_nonredundant() { attr=$(get lv_field "$lv" attr) (echo "$attr" | grep "^......m...$" >/dev/null) || { if (echo "$attr" | grep "^o.........$" >/dev/null) && - lvs -a | grep -F "[${2}_mimage" >/dev/null; then + lvs -a $1 | grep -F "[${2}_mimage" >/dev/null; then echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror," echo "assuming it is actually a mirror" else