[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: Clean up all extents for vmdk
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: Clean up all extents for vmdk |
Date: |
Thu, 2 Jan 2014 17:40:58 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Nov 26, 2013 at 02:40:34PM +0800, Fam Zheng wrote:
> This modifies _cleanup_test_img to remove all the extent files listed by
> "qemu-img info"'s format specific information.
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> tests/qemu-iotests/common.rc | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index d465c48..fd635a0 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -170,6 +170,17 @@ _make_test_img()
> fi
> }
>
> +_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: \
> + | xargs -I {} rm -f "{}"
> + fi
> + rm -f $img
> +}
It would be nice to simply rm -rf "$TEST_DIR" instead of picking
individual files.
Not sure if anything prevents us from doing that. Anyway, this patch is
okay for now.
Stefan
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: Clean up all extents for vmdk,
Stefan Hajnoczi <=