From d12c0ae16315680efcd2306f8f657d45e7c4aca6 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 9 Jul 2017 13:38:37 +0200 Subject: [PATCH] tests: utils.sh assign directly Assign properly quoted vars in eval directly. --- test/lib/utils.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/lib/utils.sh b/test/lib/utils.sh index f4c52ade4..4e43e6479 100644 --- a/test/lib/utils.sh +++ b/test/lib/utils.sh @@ -246,12 +246,10 @@ prepare_test_vars() { vg="${PREFIX}vg" lv=LV - for i in $(seq 1 16); do - name="${PREFIX}pv$i" - dev="$DM_DEV_DIR/mapper/$name" - eval "dev$i=\"$dev\"" - eval "lv$i=LV$i" - eval "vg$i=${PREFIX}vg$i" + for i in {1..16}; do + eval "dev$i=\"$DM_DEV_DIR/mapper/${PREFIX}pv$i\"" + eval "lv$i=\"LV$i\"" + eval "vg$i=\"${PREFIX}vg$i\"" done }