qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC v3 05/32] tests/qapi-schema: Convert test ha


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC v3 05/32] tests/qapi-schema: Convert test harness to QAPISchemaVisitor
Date: Tue, 4 Aug 2015 16:35:36 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 08/04/2015 09:57 AM, Markus Armbruster wrote:
> The old code prints the result of parsing (list of expression
> dictionaries), and partial results of semantic analysis (list of enum
> dictionaries, list of struct dictionaries).
> 
> The new code prints a trace of a schema visit, i.e. what the back-ends
> are going to use.  Built-in and array types are omitted, because
> they're boring.

Array types might be less boring in the future when we fix the TODO
about unconditional array type generation - but that is in the realm of
the future and doesn't affect this patch.

> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  tests/qapi-schema/alternate-good.out            |  15 +-
>  tests/qapi-schema/args-member-array.out         |  13 +-
>  tests/qapi-schema/comments.out                  |   4 +-
>  tests/qapi-schema/empty.out                     |   3 -
>  tests/qapi-schema/enum-empty.out                |   4 +-
>  tests/qapi-schema/event-case.out                |   4 +-
>  tests/qapi-schema/flat-union-reverse-define.out |  21 ++-
>  tests/qapi-schema/ident-with-escape.out         |   7 +-
>  tests/qapi-schema/include-relpath.out           |   4 +-
>  tests/qapi-schema/include-repetition.out        |   4 +-
>  tests/qapi-schema/include-simple.out            |   4 +-
>  tests/qapi-schema/indented-expr.out             |   7 +-
>  tests/qapi-schema/qapi-schema-test.out          | 214 
> ++++++++++++++++++------
>  tests/qapi-schema/returns-int.out               |   5 +-
>  tests/qapi-schema/test-qapi.py                  |  38 ++++-
>  tests/qapi-schema/type-bypass.out               |   7 +-
>  16 files changed, 239 insertions(+), 115 deletions(-)

I don't know if you wanted to hoist the creation of the ':empty' object
into this patch, for less churn later on.  But if you don't, I'm fine
with leaving this alone.

Reviewed-by: Eric Blake <address@hidden>

> +++ b/tests/qapi-schema/qapi-schema-test.out
> @@ -1,55 +1,159 @@

> +object :obj-boolList-wrapper
> +    member data: boolList optional=False
...
> +object UserDefNativeListUnion
> +    case integer: :obj-intList-wrapper

Simple unions turned out nicely with the generated wrapper type.

-- 
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]