summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/024
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2013-09-25 08:12:22 -0400
committerKevin Wolf <kwolf@redhat.com>2013-09-27 11:10:45 +0200
commitfef9c19139f4d69a080d99b8cbade163d0bbf0fc (patch)
tree2c7a688b0d1305a9522e7dc7f87ae5262684c19e /tests/qemu-iotests/024
parent85edbd375b9ab451c6769011cb6b3e0287dc71e4 (diff)
downloadqemu-fef9c19139f4d69a080d99b8cbade163d0bbf0fc.tar.gz
qemu-iotests: Quote $TEST_IMG* and $TEST_DIR usage
A lot of image filename and paths are used unquoted. Quote these to make sure that directories / filenames with spaces are not problematic. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/024')
-rwxr-xr-xtests/qemu-iotests/02412
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024
index 554b74b2d3..be974f02a2 100755
--- a/tests/qemu-iotests/024
+++ b/tests/qemu-iotests/024
@@ -31,8 +31,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
- rm -f $TEST_DIR/t.$IMGFMT.base_old
- rm -f $TEST_DIR/t.$IMGFMT.base_new
+ rm -f "$TEST_DIR/t.$IMGFMT.base_old"
+ rm -f "$TEST_DIR/t.$IMGFMT.base_new"
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -62,19 +62,19 @@ echo
_make_test_img 1G
io_pattern writev 0 $CLUSTER_SIZE $((2 * CLUSTER_SIZE)) 8 0x11
-mv $TEST_IMG $TEST_IMG.base_old
+mv "$TEST_IMG" "$TEST_IMG.base_old"
echo "Creating new backing file"
echo
_make_test_img 1G
io_pattern writev 0 $((2 * CLUSTER_SIZE)) $((4 * CLUSTER_SIZE)) 4 0x22
-mv $TEST_IMG $TEST_IMG.base_new
+mv "$TEST_IMG" "$TEST_IMG.base_new"
echo "Creating COW image"
echo
-_make_test_img -b $TEST_IMG.base_old 1G
+_make_test_img -b "$TEST_IMG.base_old" 1G
io_pattern writev 0 $((4 * CLUSTER_SIZE)) 0 1 0x33
io_pattern writev $((8 * CLUSTER_SIZE)) $((4 * CLUSTER_SIZE)) 0 1 0x33
@@ -100,7 +100,7 @@ io_pattern readv $((15 * CLUSTER_SIZE)) $CLUSTER_SIZE 0 1 0x00
echo
echo Rebase and test again
echo
-$QEMU_IMG rebase -b $TEST_IMG.base_new $TEST_IMG
+$QEMU_IMG rebase -b "$TEST_IMG.base_new" "$TEST_IMG"
io_pattern readv $((0 * CLUSTER_SIZE)) $CLUSTER_SIZE 0 1 0x33
io_pattern readv $((1 * CLUSTER_SIZE)) $CLUSTER_SIZE 0 1 0x33
io_pattern readv $((2 * CLUSTER_SIZE)) $CLUSTER_SIZE 0 1 0x33