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>
This commit is contained in:
Jeff Cody 2014-04-10 16:47:39 -04:00 committed by Kevin Wolf
parent c3cc95bd15
commit c557527455

View file

@ -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()