From fef9c19139f4d69a080d99b8cbade163d0bbf0fc Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Wed, 25 Sep 2013 08:12:22 -0400 Subject: 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 Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/026 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/qemu-iotests/026') diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026 index 107a3ff..ebe29d0 100755 --- a/tests/qemu-iotests/026 +++ b/tests/qemu-iotests/026 @@ -31,7 +31,7 @@ status=1 # failure is the default! _cleanup() { _cleanup_test_img - rm $TEST_DIR/blkdebug.conf + rm "$TEST_DIR/blkdebug.conf" } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -75,7 +75,7 @@ for imm in off; do for once in on off; do for vmstate in "" "-b"; do -cat > $TEST_DIR/blkdebug.conf < "$TEST_DIR/blkdebug.conf" < /dev/null 2>&1 + $QEMU_IO -c "write $vmstate 0 512" "$TEST_IMG" > /dev/null 2>&1 fi -$QEMU_IO -c "write $vmstate 0 128k " $BLKDBG_TEST_IMG | _filter_qemu_io +$QEMU_IO -c "write $vmstate 0 128k " "$BLKDBG_TEST_IMG" | _filter_qemu_io # l2_load is not called on allocation, so issue a second write # Reads are another path to trigger l2_load, so do a read, too if [ "$event" == "l2_load" ]; then - $QEMU_IO -c "write $vmstate 0 128k " $BLKDBG_TEST_IMG | _filter_qemu_io - $QEMU_IO -c "read $vmstate 0 128k " $BLKDBG_TEST_IMG | _filter_qemu_io + $QEMU_IO -c "write $vmstate 0 128k " "$BLKDBG_TEST_IMG" | _filter_qemu_io + $QEMU_IO -c "read $vmstate 0 128k " "$BLKDBG_TEST_IMG" | _filter_qemu_io fi _check_test_img 2>&1 | grep -v "refcount=1 reference=0" @@ -133,7 +133,7 @@ for imm in off; do for once in on off; do for vmstate in "" "-b"; do -cat > $TEST_DIR/blkdebug.conf < "$TEST_DIR/blkdebug.conf" <&1 | grep -v "refcount=1 reference=0" @@ -172,7 +172,7 @@ for errno in 5 28; do for imm in off; do for once in on off; do -cat > $TEST_DIR/blkdebug.conf < "$TEST_DIR/blkdebug.conf" <&1 | grep -v "refcount=1 reference=0" -- cgit v1.1