diff options
author | Jeff Cody <jcody@redhat.com> | 2013-09-25 08:12:22 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-09-27 11:10:45 +0200 |
commit | fef9c19139f4d69a080d99b8cbade163d0bbf0fc (patch) | |
tree | 2c7a688b0d1305a9522e7dc7f87ae5262684c19e /tests/qemu-iotests/049 | |
parent | 85edbd375b9ab451c6769011cb6b3e0287dc71e4 (diff) |
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/049')
-rwxr-xr-x | tests/qemu-iotests/049 | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/qemu-iotests/049 b/tests/qemu-iotests/049 index 6c6017e2d2..93aa0ea55f 100755 --- a/tests/qemu-iotests/049 +++ b/tests/qemu-iotests/049 @@ -63,13 +63,13 @@ sizes+="1024.0 1024.0b 1.5k 1.5K 1.5M 1.5G 1.5T" echo "== 1. Traditional size parameter ==" echo for s in $sizes; do - test_qemu_img create -f $IMGFMT $TEST_IMG $s + test_qemu_img create -f $IMGFMT "$TEST_IMG" $s done echo "== 2. Specifying size via -o ==" echo for s in $sizes; do - test_qemu_img create -f $IMGFMT -o size=$s $TEST_IMG + test_qemu_img create -f $IMGFMT -o size=$s "$TEST_IMG" done echo "== 3. Invalid sizes ==" @@ -77,8 +77,8 @@ echo sizes="-1024 -1k 1kilobyte foobar" for s in $sizes; do - test_qemu_img create -f $IMGFMT $TEST_IMG -- $s - test_qemu_img create -f $IMGFMT -o size=$s $TEST_IMG + test_qemu_img create -f $IMGFMT "$TEST_IMG" -- $s + test_qemu_img create -f $IMGFMT -o size=$s "$TEST_IMG" done echo "== Check correct interpretation of suffixes for cluster size ==" @@ -87,35 +87,35 @@ sizes="1024 1024b 1k 1K 1M " sizes+="1024.0 1024.0b 0.5k 0.5K 0.5M" for s in $sizes; do - test_qemu_img create -f $IMGFMT -o cluster_size=$s $TEST_IMG 64M + test_qemu_img create -f $IMGFMT -o cluster_size=$s "$TEST_IMG" 64M done echo "== Check compat level option ==" echo -test_qemu_img create -f $IMGFMT -o compat=0.10 $TEST_IMG 64M -test_qemu_img create -f $IMGFMT -o compat=1.1 $TEST_IMG 64M +test_qemu_img create -f $IMGFMT -o compat=0.10 "$TEST_IMG" 64M +test_qemu_img create -f $IMGFMT -o compat=1.1 "$TEST_IMG" 64M -test_qemu_img create -f $IMGFMT -o compat=0.42 $TEST_IMG 64M -test_qemu_img create -f $IMGFMT -o compat=foobar $TEST_IMG 64M +test_qemu_img create -f $IMGFMT -o compat=0.42 "$TEST_IMG" 64M +test_qemu_img create -f $IMGFMT -o compat=foobar "$TEST_IMG" 64M echo "== Check preallocation option ==" echo -test_qemu_img create -f $IMGFMT -o preallocation=off $TEST_IMG 64M -test_qemu_img create -f $IMGFMT -o preallocation=metadata $TEST_IMG 64M -test_qemu_img create -f $IMGFMT -o preallocation=1234 $TEST_IMG 64M +test_qemu_img create -f $IMGFMT -o preallocation=off "$TEST_IMG" 64M +test_qemu_img create -f $IMGFMT -o preallocation=metadata "$TEST_IMG" 64M +test_qemu_img create -f $IMGFMT -o preallocation=1234 "$TEST_IMG" 64M echo "== Check encryption option ==" echo -test_qemu_img create -f $IMGFMT -o encryption=off $TEST_IMG 64M -test_qemu_img create -f $IMGFMT -o encryption=on $TEST_IMG 64M +test_qemu_img create -f $IMGFMT -o encryption=off "$TEST_IMG" 64M +test_qemu_img create -f $IMGFMT -o encryption=on "$TEST_IMG" 64M echo "== Check lazy_refcounts option (only with v3) ==" echo -test_qemu_img create -f $IMGFMT -o compat=1.1,lazy_refcounts=off $TEST_IMG 64M -test_qemu_img create -f $IMGFMT -o compat=1.1,lazy_refcounts=on $TEST_IMG 64M +test_qemu_img create -f $IMGFMT -o compat=1.1,lazy_refcounts=off "$TEST_IMG" 64M +test_qemu_img create -f $IMGFMT -o compat=1.1,lazy_refcounts=on "$TEST_IMG" 64M -test_qemu_img create -f $IMGFMT -o compat=0.10,lazy_refcounts=off $TEST_IMG 64M -test_qemu_img create -f $IMGFMT -o compat=0.10,lazy_refcounts=on $TEST_IMG 64M +test_qemu_img create -f $IMGFMT -o compat=0.10,lazy_refcounts=off "$TEST_IMG" 64M +test_qemu_img create -f $IMGFMT -o compat=0.10,lazy_refcounts=on "$TEST_IMG" 64M # success, all done echo "*** done" |