[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 22/39] qapi: Unify type bypass and add tests

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v7 22/39] qapi: Unify type bypass and add tests
Date: Fri, 01 May 2015 13:55:52 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/29/2015 07:06 AM, Eric Blake wrote:
> For a few QMP commands, we are forced to pass an arbitrary type
> without tracking it properly in QAPI.  Among the existing clients,
> this unnamed type was spelled 'dict', 'visitor', and '**'; this
> patch standardizes on '**', matching the documentation changes
> earlier in the series.
> Meanwhile, for both 'gen' and 'success-response' keys, we have been
> ignoring the value, although the schema consistently used "'no'".

True for 'gen', not quite true for 'success-response' (where we looked
specifically for the value 'no').

> But now that we can support a literal "false" in the schema, we
> might as well use that rather than ignoring the value or
> special-casing a random string.  Note that these are one-way
> switches (use of 'gen':true is not the same as omitting 'gen').
> Also, the use of '**' requires 'gen':false, but the use of
> 'gen':false does not mandate the use of '**'.
> There is no difference to the generated code.  Add some tests on
> what we'd like to guarantee, although it will take later patches
> to clean up test results and actually enforce the use of a bool
> parameter.

There was no difference to the QMP generated code, but I caused a
regression with the QGA code. I'll post a followup that should be
squashed into this patch.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]