Blame SOURCES/kvm-block-qemu-iotests-add-quotes-to-TEST_IMG-usage-io-p.patch

0a122b
From b592b76b870d07c394156192913924af7d1a8079 Mon Sep 17 00:00:00 2001
0a122b
From: Jeffrey Cody <jcody@redhat.com>
0a122b
Date: Wed, 20 Nov 2013 19:43:45 +0100
0a122b
Subject: [PATCH 02/25] block: qemu-iotests, add quotes to $TEST_IMG usage io pattern tests
0a122b
0a122b
RH-Author: Jeffrey Cody <jcody@redhat.com>
0a122b
Message-id: <0ff2c944dec278cb605a62a3ec55fd0a57432ecf.1384975172.git.jcody@redhat.com>
0a122b
Patchwork-id: 55795
0a122b
O-Subject: [RHEL7 qemu-kvm PATCH 02/26] block: qemu-iotests, add quotes to $TEST_IMG usage io pattern tests
0a122b
Bugzilla: 879234
0a122b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Fam Zheng <famz@redhat.com>
0a122b
0a122b
The usage of $TEST_IMG was not properly quoted everywhere in
0a122b
common.pattern.
0a122b
0a122b
Signed-off-by: Jeff Cody <jcody@redhat.com>
0a122b
Reviewed-by: Eric Blake <eblake@redhat.com>
0a122b
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
(cherry picked from commit 0084043888f6773d905c1b5d644b89c79d1c7714)
0a122b
---
0a122b
 tests/qemu-iotests/common.pattern | 12 ++++++------
0a122b
 1 file changed, 6 insertions(+), 6 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 tests/qemu-iotests/common.pattern |   12 ++++++------
0a122b
 1 files changed, 6 insertions(+), 6 deletions(-)
0a122b
0a122b
diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
0a122b
index 00e0f60..ddfbca1 100644
0a122b
--- a/tests/qemu-iotests/common.pattern
0a122b
+++ b/tests/qemu-iotests/common.pattern
0a122b
@@ -28,7 +28,7 @@ function do_is_allocated() {
0a122b
 }
0a122b
 
0a122b
 function is_allocated() {
0a122b
-    do_is_allocated "$@" | $QEMU_IO $TEST_IMG | _filter_qemu_io
0a122b
+    do_is_allocated "$@" | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
0a122b
 }
0a122b
 
0a122b
 function do_io() {
0a122b
@@ -46,18 +46,18 @@ function do_io() {
0a122b
 }
0a122b
 
0a122b
 function io_pattern() {
0a122b
-    do_io "$@" | $QEMU_IO $TEST_IMG | _filter_qemu_io
0a122b
+    do_io "$@" | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
0a122b
 }
0a122b
 
0a122b
 function io() {
0a122b
     local start=$2
0a122b
     local pattern=$(( (start >> 9) % 256 ))
0a122b
 
0a122b
-    do_io "$@" $pattern | $QEMU_IO $TEST_IMG | _filter_qemu_io
0a122b
+    do_io "$@" $pattern | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
0a122b
 }
0a122b
 
0a122b
 function io_zero() {
0a122b
-    do_io "$@" 0 | $QEMU_IO $TEST_IMG | _filter_qemu_io
0a122b
+    do_io "$@" 0 | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
0a122b
 }
0a122b
 
0a122b
 function io_test() {
0a122b
@@ -117,8 +117,8 @@ function io_test2() {
0a122b
     echo === Clusters to be compressed [3]
0a122b
     io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165
0a122b
 
0a122b
-    mv $TEST_IMG $TEST_IMG.orig
0a122b
-    $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
0a122b
+    mv "$TEST_IMG" "$TEST_IMG.orig"
0a122b
+    $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"
0a122b
 
0a122b
     # Write the used clusters
0a122b
     echo === Used clusters [1]
0a122b
-- 
0a122b
1.7.1
0a122b