From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com, Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v7 05/14] qapi: Rework collision assertions
Date: Fri, 23 Oct 2015 17:33:33 -0600 [thread overview]
Message-ID: <562AC3CD.3000208@redhat.com> (raw)
In-Reply-To: <1445056549-7815-6-git-send-email-eblake@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2409 bytes --]
On 10/16/2015 10:35 PM, Eric Blake wrote:
> Now that we have separate namespaces for QMP vs. tag values,
> we can simplify how the QAPISchema*.check() methods check for
> collisions. Each QAPISchemaObjectTypeMember check() call is
> given a single set of names it must not collide with; this set
> is either the QMP names (when this member is used by an
> ObjectType) or the case names (when this member is used by an
> ObjectTypeVariants). We no longer need an all_members
> parameter, as it can be computed by seen.values(). When used
> by a union, QAPISchemaObjectTypeVariant must also perform a
> QMP collision check for each member of its corresponding type.
>
> The new ObjectType.check_qmp() is an idempotent subset of
> check(), and can be called multiple times over different seen
> sets (useful, since the members of one type can be applied
> into more than one other location via inheritance or flat
> union variants).
>
> The code needs a temporary hack of passing a 'union' flag
> through Variants.check(), since we do not inline the branches
> of an alternate type into a parent QMP object. A later patch
> will rework how alternates are laid out, by adding a new
> subclass, and that will allow us to drop the extra parameter.
>
> There are no changes to generated code, and we can now add a
> positive test to qapi-schema-test that proves that alternates
> can now use names that would previously trigger assertions
> (see commit 7b2a5c2f for an example of the failure that was
> still possible for alternates before this commit).
>
> Future patches will add more positive tests, improve error
> message quality on actual collisions, and move collision
> checks out of ad hoc parse code into the check() methods.
This paragraph may be a bit out of date based on rebasing that I've
done, but one patch for sure that needs to come later is deferring
subset B v10 24/25 to after this point. The patch itself should be in
good state for reviewing, even if the commit message needs massaging.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>
>
> ---
> v7: new patch, although it is a much cleaner implementation of
> what was attempted by subset B v8 15/18
> https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg03042.html
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-10-23 23:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 4:35 [Qemu-devel] [PATCH v7 00/14] alternate layout (post-introspection cleanups, subset C) Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 01/14] qapi: Use generated TestStruct machinery in tests Eric Blake
2015-10-22 15:58 ` Markus Armbruster
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 02/14] qapi: Strengthen test of TestStructList Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 03/14] qapi: Provide nicer array names in introspection Eric Blake
2015-10-22 16:12 ` Markus Armbruster
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 04/14] qapi-introspect: Guarantee particular sorting Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 05/14] qapi: Rework collision assertions Eric Blake
2015-10-23 23:33 ` Eric Blake [this message]
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 06/14] qapi: Update tests related to QMP/branch collisions Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 07/14] qapi: Simplify visiting of alternate types Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 08/14] qapi: Fix alternates that accept 'number' but not 'int' Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 09/14] qapi: Remove dead visitor code Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 10/14] qapi: Plug leaks in test-qmp-* Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 11/14] qapi: Simplify error testing " Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 12/14] qapi: Test failure in middle of array parse Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 13/14] qapi: More tests of input arrays Eric Blake
2015-10-17 4:35 ` [Qemu-devel] [PATCH v7 14/14] qapi: Simplify visits of optional fields Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=562AC3CD.3000208@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.