On 06.03.19 19:11, Alberto Garcia wrote:
> This patch adds several tests for the x-blockdev-reopen QMP command.
> 
> Signed-off-by: Alberto Garcia <be...@igalia.com>
> ---
>  tests/qemu-iotests/243     | 991 
> +++++++++++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/243.out |   5 +
>  tests/qemu-iotests/group   |   1 +
>  3 files changed, 997 insertions(+)
>  create mode 100644 tests/qemu-iotests/243
>  create mode 100644 tests/qemu-iotests/243.out
> 
> diff --git a/tests/qemu-iotests/243 b/tests/qemu-iotests/243
> new file mode 100644
> index 0000000000..35b30092ca
> --- /dev/null
> +++ b/tests/qemu-iotests/243
> @@ -0,0 +1,991 @@

[...]

> +    # If an image has a backing file then the 'backing' option must be
> +    # passed on reopen. We don't allow leaving the option out in this
> +    # case because it's unclear what the correct semantics would be.
> +    def test_missing_backing_options_1(self):

[...]

> +        # hd0 has no backing file: we can omit the 'backing' option
> +        self.reopen(opts)

[...]

> +        # Detach hd2 from hd0.
> +        self.reopen(opts, {'backing': None})
> +        self.reopen(opts, {}, "backing is missing for 'hd0'")

I don’t understand the second test.  hd0 has no default backing file and
it currently has no backing child attached to it.  Why would this call
fail now?

I’m asking because this no longer throws an error after “block: Leave
BDS.backing_file constant” of my “block: Deal with filters” series.

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to