Skip to content

Commit

Permalink
block: qemu-iotests, add quotes to $TEST_IMG usage io pattern tests
Browse files Browse the repository at this point in the history
The usage of $TEST_IMG was not properly quoted everywhere in
common.pattern.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
codyprime authored and stefanhaRH committed Nov 7, 2013
1 parent 511018e commit 0084043
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/qemu-iotests/common.pattern
Expand Up @@ -28,7 +28,7 @@ function do_is_allocated() {
}

function is_allocated() {
do_is_allocated "$@" | $QEMU_IO $TEST_IMG | _filter_qemu_io
do_is_allocated "$@" | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
}

function do_io() {
Expand All @@ -46,18 +46,18 @@ function do_io() {
}

function io_pattern() {
do_io "$@" | $QEMU_IO $TEST_IMG | _filter_qemu_io
do_io "$@" | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
}

function io() {
local start=$2
local pattern=$(( (start >> 9) % 256 ))

do_io "$@" $pattern | $QEMU_IO $TEST_IMG | _filter_qemu_io
do_io "$@" $pattern | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
}

function io_zero() {
do_io "$@" 0 | $QEMU_IO $TEST_IMG | _filter_qemu_io
do_io "$@" 0 | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
}

function io_test() {
Expand Down Expand Up @@ -117,8 +117,8 @@ function io_test2() {
echo === Clusters to be compressed [3]
io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165

mv $TEST_IMG $TEST_IMG.orig
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c $TEST_IMG.orig $TEST_IMG
mv "$TEST_IMG" "$TEST_IMG.orig"
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"

# Write the used clusters
echo === Used clusters [1]
Expand Down

0 comments on commit 0084043

Please sign in to comment.