summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2014-04-10 16:47:39 -0400
committerKevin Wolf <kwolf@redhat.com>2014-04-29 16:19:33 +0200
commitc55752745536712f778e9a0d73a078bdb0360df2 (patch)
tree89b63b48e5b2de394ec588555dc8f84647030415 /tests
parentc3cc95bd155d51fc1f9b7259b3bff20a361a1cca (diff)
downloadqemu-c55752745536712f778e9a0d73a078bdb0360df2.tar.gz
block: qemu-iotests - fix image cleanup when using spaced pathnames
The _rm_test_img() function in common.rc did not quote the image file, which left droppings in the scratch directory (and performed a potentially unsafe rm -f). This adds the necessary quotes. Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/common.rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 7f00883cad..195c5646aa 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -178,10 +178,10 @@ _rm_test_img()
local img=$1
if [ "$IMGFMT" = "vmdk" ]; then
# Remove all the extents for vmdk
- $QEMU_IMG info $img 2>/dev/null | grep 'filename:' | cut -f 2 -d: \
+ "$QEMU_IMG" info "$img" 2>/dev/null | grep 'filename:' | cut -f 2 -d: \
| xargs -I {} rm -f "{}"
fi
- rm -f $img
+ rm -f "$img"
}
_cleanup_test_img()