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:
parent
c3cc95bd15
commit
c557527455
|
@ -178,10 +178,10 @@ _rm_test_img()
|
||||||
local img=$1
|
local img=$1
|
||||||
if [ "$IMGFMT" = "vmdk" ]; then
|
if [ "$IMGFMT" = "vmdk" ]; then
|
||||||
# Remove all the extents for vmdk
|
# 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 "{}"
|
| xargs -I {} rm -f "{}"
|
||||||
fi
|
fi
|
||||||
rm -f $img
|
rm -f "$img"
|
||||||
}
|
}
|
||||||
|
|
||||||
_cleanup_test_img()
|
_cleanup_test_img()
|
||||||
|
|
Loading…
Reference in a new issue