Received: from eggs.gnu.org ([2001:4830:134:3::10]:37549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4E0I-0007YQ-G9 for qemu-devel@nongnu.org; Wed, 02 Dec 2015 15:27:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4E0F-0007Gg-IP for qemu-devel@nongnu.org; Wed, 02 Dec 2015 15:27:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4E0F-0007G2-D6 for qemu-devel@nongnu.org; Wed, 02 Dec 2015 15:27:51 -0500 From: Markus Armbruster References: <1449033659-25497-1-git-send-email-eblake@redhat.com> <1449033659-25497-14-git-send-email-eblake@redhat.com> <87lh9dukyw.fsf@blackfin.pond.sub.org> <565EF521.5030307@redhat.com> <565F0C00.8050805@redhat.com> <87oae8ix9b.fsf@blackfin.pond.sub.org> <565F49DE.8060303@redhat.com> Date: Wed, 02 Dec 2015 21:27:48 +0100 In-Reply-To: <565F49DE.8060303@redhat.com> (Eric Blake's message of "Wed, 2 Dec 2015 12:43:26 -0700") Message-ID: <87h9k0a94r.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v14 13/15] qapi: Enforce (or whitelist) case conventions on qapi members List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Michael Roth Eric Blake 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 >> 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 >> --- >> 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!