summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.rc
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/common.rc
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/common.rc')
-rw-r--r--tests/qemu-iotests/common.rc16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 6730955288..1b22db04f4 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -164,12 +164,12 @@ _cleanup_test_img()
nbd)
kill $QEMU_NBD_PID
- rm -f $TEST_IMG_FILE
+ rm -f "$TEST_IMG_FILE"
;;
file)
- rm -f $TEST_DIR/t.$IMGFMT
- rm -f $TEST_DIR/t.$IMGFMT.orig
- rm -f $TEST_DIR/t.$IMGFMT.base
+ rm -f "$TEST_DIR/t.$IMGFMT"
+ rm -f "$TEST_DIR/t.$IMGFMT.orig"
+ rm -f "$TEST_DIR/t.$IMGFMT.base"
if [ -n "$SAMPLE_IMG_FILE" ]
then
rm -f "$TEST_DIR/$SAMPLE_IMG_FILE"
@@ -177,11 +177,11 @@ _cleanup_test_img()
;;
rbd)
- rbd rm $TEST_DIR/t.$IMGFMT > /dev/null
+ rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
;;
sheepdog)
- collie vdi delete $TEST_DIR/t.$IMGFMT
+ collie vdi delete "$TEST_DIR/t.$IMGFMT"
;;
esac
@@ -189,7 +189,7 @@ _cleanup_test_img()
_check_test_img()
{
- $QEMU_IMG check "$@" -f $IMGFMT $TEST_IMG 2>&1 | _filter_testdir | \
+ $QEMU_IMG check "$@" -f $IMGFMT "$TEST_IMG" 2>&1 | _filter_testdir | \
sed -e '/allocated.*fragmented.*compressed clusters/d' \
-e 's/qemu-img: This image format does not support checks/No errors were found on the image./' \
-e '/Image end offset: [0-9]\+/d'
@@ -197,7 +197,7 @@ _check_test_img()
_img_info()
{
- $QEMU_IMG info "$@" $TEST_IMG 2>&1 | \
+ $QEMU_IMG info "$@" "$TEST_IMG" 2>&1 | \
sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \
-e "s#$TEST_DIR#TEST_DIR#g" \
-e "s#$IMGFMT#IMGFMT#g" \