[Top][All Lists]

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

Re: [PATCH v2 6/6] tests/qapi-schema: Test cases for aliases

From: Markus Armbruster
Subject: Re: [PATCH v2 6/6] tests/qapi-schema: Test cases for aliases
Date: Wed, 17 Feb 2021 13:23:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Markus Armbruster <armbru@redhat.com> writes:

> Kevin Wolf <kwolf@redhat.com> writes:
>> Am 16.02.2021 um 16:14 hat Markus Armbruster geschrieben:
>>> Kevin Wolf <kwolf@redhat.com> writes:
>>> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
>>> [...]
>>> > diff --git a/tests/qapi-schema/alias-name-bad-type.err 
>>> > b/tests/qapi-schema/alias-name-bad-type.err
>>> > new file mode 100644
>>> > index 0000000000..489f45ff9b
>>> > --- /dev/null
>>> > +++ b/tests/qapi-schema/alias-name-bad-type.err
>>> > @@ -0,0 +1,2 @@
>>> > +alias-name-bad-type.json: In struct 'AliasStruct0':
>>> > +alias-name-bad-type.json:1: alias member 'name' requires a string name
>>> Would "'aliases' member 'name'..." be more consistent?
>> 'aliases' is a list, not a single alias definition, so technically it
>> would have to be "'aliases' member member 'name'...", which I feel is a
>> bit too confusing.
> Indeed.
> I think glossing over the list is excusable.
>> I think I have consistently used "alias" for "'aliases' member"
>> everywhere, though. At least, that was the intention.
> A different way of glossing over details.  Should do as well.  I'll
> double-check consistency.

I did, and it looks okay:

    $ grep "'alias" *err
    alias-bad-type.err:alias-bad-type.json:1: 'aliases' members must be objects

Okay; we are talking about members of array 'aliases' here.

    alias-missing-source.err:alias-missing-source.json:1: 'aliases' member 
misses key 'source'


    alias-unknown-key.err:alias-unknown-key.json:1: 'aliases' member has 
unknown key 'known'


    aliases-bad-type.err:aliases-bad-type.json:1: 'aliases' must be an array

Okay; we are talking about 'aliases'.

    double-type.err:Valid keys are 'aliases', 'base', 'data', 'features', 'if', 
    unknown-expr-key.err:Valid keys are 'aliases', 'base', 'data', 'features', 
'if', 'struct'.


reply via email to

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