[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case con
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case conventions on qapi members |
Date: |
Wed, 02 Dec 2015 21:27:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 12/02/2015 10:19 AM, Markus Armbruster wrote:
>
>>> With your patch, the positive tests no longer work in isolation. You
>>> were getting lucky that things sorted such that 'Foo' was checked for
>>> correctness prior to 'UuidInfo'; but if you comment out the 'Foo'
>>> declaration, or rename from 'Foo' to something else that hashes after
>>> 'UuidInfo', then args-member-case and union-branch-case start reporting
>>> failures about UuidInfo (and only enum-member-case honors the
>>> whitelist).
>>
>> You're right.
>>
>
>>> +++ w/tests/qapi-schema/args-member-case.json
>>> @@ -1,3 +1,3 @@
>>> # Member names should be 'lower-case' unless the struct/command is
>>> whitelisted
>>> -{ 'command': 'UuidInfo', 'data': { 'Arg': 'int' } }
>>> +{ 'command': 'x-UuidInfo', 'data': { 'Arg': 'int' } }
>>
>> Will fail as soon as we enforce the command naming convention. To avoid
>> that, we need to add a suitable name to the whitelist.
>>
>> However, we don't actually have any command parameters to whitelist.
>> Why bother testing it then?
>
> Good point.
>
>
>>
>>>From 44f07a40c8b9b5d1f24833028b5dacde1fd50c80 Mon Sep 17 00:00:00 2001
>> From: Markus Armbruster <address@hidden>
>> Date: Wed, 2 Dec 2015 17:41:55 +0100
>> Subject: [PATCH] fixup! qapi: Enforce (or whitelist) case conventions on qapi
>> members
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> scripts/qapi.py | 6 ++----
>> tests/qapi-schema/args-member-case.err | 2 +-
>> tests/qapi-schema/args-member-case.json | 3 +--
>> tests/qapi-schema/enum-member-case.err | 2 +-
>> tests/qapi-schema/enum-member-case.json | 4 ++--
>> tests/qapi-schema/union-branch-case.err | 2 +-
>> tests/qapi-schema/union-branch-case.json | 3 +--
>> 7 files changed, 9 insertions(+), 13 deletions(-)
>
> Looks good. Commit 6c1eb345 on your qapi-not-next branch has this
> already squashed in, but lacking your S-o-b. But that only affects the
> commit message, so I'll go ahead and base my future patch submissions on
> top of the current contents of qapi-not-next (it will be interesting to
> see how many patches land from various trees right after 2.6 opens up...)
I intended to push with a separate fixup commit; looks like a last
minute rebase to tweak commit messages squashed it in. Anyway, I fixed
up the commit message and pushed again. Thanks!
[Qemu-devel] [PATCH v14 12/15] qapi: Populate info['name'] for each entity, Eric Blake, 2015/12/02
[Qemu-devel] [PATCH v14 04/15] qapi: Simplify visiting of alternate types, Eric Blake, 2015/12/02
[Qemu-devel] [PATCH v14 14/15] qapi: Move duplicate collision checks to schema check(), Eric Blake, 2015/12/02
Re: [Qemu-devel] [PATCH v14 00/15] qapi member collision (post-introspection cleanups, subset D), Markus Armbruster, 2015/12/02