From e84a145cf4f593a4560f109b486a1fa1d999fe2d Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 30 Jun 2017 11:06:19 +0200 Subject: [PATCH] tests: check.sh uses array for list For properly quoted args, switch to use arrays for arg list. --- test/lib/check.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/lib/check.sh b/test/lib/check.sh index a43aef732..c8efccad4 100644 --- a/test/lib/check.sh +++ b/test/lib/check.sh @@ -261,14 +261,14 @@ inactive() { # Check for list of LVs from given VG lv_exists() { local vg=$1 - local lv= + declare -a list=() while [ $# -gt 1 ]; do shift - lv="$lv $vg/$1" + list+=( "$vg/$1" ) done - test -n "$lv" || lv=$vg - lvl "$lv" &>/dev/null || \ - die "$lv expected to exist but does not" + test "${#list[@]}" -gt 0 || list=( "$vg" ) + lvl "${list[@]}" &>/dev/null || \ + die "${list[@]}" "expected to exist, but does not!" } lv_not_exists() {