Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e84a145cf4f593a4560...
Commit: e84a145cf4f593a4560f109b486a1fa1d999fe2d
Parent: c613fa48ffc0b4b89beedb93612270b29cc41fb9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 30 11:06:19 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jun 30 12:09:10 2017 +0200
tests: check.sh uses array for list
For properly quoted args, switch to use arrays for arg list.
---
test/lib/check.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/lib/check.sh b/test/lib/check.sh
index a43aef7..c8efcca 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() {