[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 3/3] iotests: Add test for rebase without inp
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v2 3/3] iotests: Add test for rebase without input base |
Date: |
Wed, 8 May 2019 16:46:39 +0200 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
Am 08.05.2019 um 16:01 hat Max Reitz geschrieben:
> This patch adds a test for rebasing an image that currently does not
> have a backing file.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> tests/qemu-iotests/024 | 70 ++++++++++++++++++++++++++++++++++++++
> tests/qemu-iotests/024.out | 37 ++++++++++++++++++++
> 2 files changed, 107 insertions(+)
>
> diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024
> index 23298c6f59..baf8ec9f28 100755
> --- a/tests/qemu-iotests/024
> +++ b/tests/qemu-iotests/024
> @@ -198,6 +198,76 @@ echo
> # $BASE_OLD and $BASE_NEW)
> $QEMU_IMG map "$OVERLAY" | _filter_qemu_img_map
>
> +echo
> +echo "=== Test rebase without input base ==="
> +echo
> +
> +# Cluster allocations to be tested:
> +#
> +# Backing (new) 11 -- 11 -- 11 --
> +# COW image 22 22 11 11 -- --
> +#
> +# Expected result:
> +#
> +# COW image 22 22 11 11 00 --
> +#
> +# (Cluster 2 might be "--" after the rebase, too, but rebase just
> +# compares the new backing file to the old one and disregards the
> +# overlay. Therefore, it will never discard overlay clusters.)
Is there a reason not to do that, though? I haven't tried it, but
shouldn't it be as easy as reading from blk instead of blk_old_backing?
Matter for another patch, though.
Kevin