[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests |
Date: |
Thu, 25 Sep 2014 08:00:27 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
On 09/25/2014 02:06 AM, Markus Armbruster wrote:
>>
>> The QAPI schema's 'returns' becomes "return" on the wire. We suck.
>>
>> qmp-spec.txt is *wrong*! We actually use json-array in addition to
>> json-object.
>
> Actually, we use json-int and json-str as well:
> query-migrate-cache-size, ringbuf-read, human-monitor-command.
>
>> Similar argument on types wanted as for 'data' / "arguments" above. I
>> think we should permit exactly the same QAPI types, plus lists.
>
> The similarity to 'data' just isn't there. Separate analysis needed.
Correct. 'data' and 'returns' are different beasts when it comes to
acceptable types. And different still from the acceptable type of each
member of a dictionary. But my check_type function in 13/19 is flexible
enough to cover all the cases.
>
> Any QAPI types that don't make sense, other than list with length != 1?
Return of an anon union isn't used yet, but _might_ make sense (as the
only feasible way of changing existing commands that return an array or
primitive extensible to instead return a dict) - except that back-compat
demands that we can't return a dict in place of a primitive unless the
arguments of the command are also enhanced (that is, older callers are
not expecting a dict, so we can't return a dict unless the caller
witnesses they are new enough by explicitly asking for a dict return).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 13/19] qapi: More rigourous checking of types, (continued)
- [Qemu-devel] [PATCH v4 13/19] qapi: More rigourous checking of types, Eric Blake, 2014/09/19
- [Qemu-devel] [PATCH v4 07/19] qapi: Add some expr tests, Eric Blake, 2014/09/19
- [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests, Eric Blake, 2014/09/19
- Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests, Markus Armbruster, 2014/09/25
- Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests, Markus Armbruster, 2014/09/25
- Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests,
Eric Blake <=
- Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests, Markus Armbruster, 2014/09/25
- Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests, Eric Blake, 2014/09/25
- Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests, Markus Armbruster, 2014/09/25
- Re: [Qemu-devel] [PATCH v4 12/19] qapi: Add some type check tests, Eric Blake, 2014/09/25
- [Qemu-devel] [PATCH v4 19/19] qapi: Drop support for inline subtypes, Eric Blake, 2014/09/19
- [Qemu-devel] [PATCH v4 06/19] qapi: Better error messages for bad enums, Eric Blake, 2014/09/19