Skip to contentSkip to conversation

master - tests: fix use of double apostrophes in get

PATCH Zdenek Kabelac 1 participant 1 message Jun 5, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=21db25b3c41dec54da2a6975bf3f3f52b151f1e7
Commit:        21db25b3c41dec54da2a6975bf3f3f52b151f1e7
Parent:        1b59f5a99c351448c43f9d7e71ee3088bafcc6c5
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Jun 5 13:05:36 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Jun 5 17:49:34 2014 +0200

tests: fix use of double apostrophes in get

Need to put "" around parameters.

---
 test/lib/get.sh |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
test/lib/get.sh +6 -3
index babc4c9..b6fbf82 100644
@@ -28,15 +28,18 @@ trim_() {
 }
 
 pv_field() {
-	trim_ "$(pvs --config 'log{prefix=""}' --noheadings -o $2 ${@:3} $1)"
+	local r=$(pvs --config 'log{prefix=""}' --noheadings -o "$2" "${@:3}" "$1")
+	trim_ "$r"
 }
 
 vg_field() {
-	trim_ "$(vgs --config 'log{prefix=""}' --noheadings -o $2 ${@:3} $1)"
+	local r=$(vgs --config 'log{prefix=""}' --noheadings -o "$2" "${@:3}" "$1")
+	trim_ "$r"
 }
 
 lv_field() {
-	trim_ "$(lvs --config 'log{prefix=""}' --noheadings -o $2 ${@:3} $1)"
+	local r=$(lvs --config 'log{prefix=""}' --noheadings -o "$2" "${@:3}" "$1")
+	trim_ "$r"
 }
 
 lv_devices() {