[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 22/40] qapi: Unify type bypass and add tests
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v8 22/40] qapi: Unify type bypass and add tests |
Date: |
Mon, 04 May 2015 19:42:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> 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 the 'gen' key, we have been ignoring the value,
> although the schema consistently used "'no'" ('success-response'
> was hard-coded to checking for '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.
>
> Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
- [Qemu-devel] [PATCH v8 19/40] qapi: Add tests of redefined expressions, (continued)
- [Qemu-devel] [PATCH v8 18/40] qapi: Better error messages for bad expressions, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 11/40] qapi: Tighten checking of unions, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 22/40] qapi: Unify type bypass and add tests, Eric Blake, 2015/05/04
- Re: [Qemu-devel] [PATCH v8 22/40] qapi: Unify type bypass and add tests,
Markus Armbruster <=
- [Qemu-devel] [PATCH v8 31/40] qapi: Forbid 'type' in schema, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 27/40] qapi: More rigorous checking for type safety bypass, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 29/40] qapi: Document 'struct' metatype, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 21/40] qapi: Allow true, false and null in schema json, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 23/40] qapi: Add some type check tests, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 25/40] qapi: Require valid names, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 26/40] qapi: Whitelist commands that don't return dictionary, Eric Blake, 2015/05/04
- [Qemu-devel] [PATCH v8 28/40] qapi: Prefer 'struct' over 'type' in generator, Eric Blake, 2015/05/04