From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycnou-0000PT-T7 for qemu-devel@nongnu.org; Tue, 31 Mar 2015 00:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ycnor-00064V-Gh for qemu-devel@nongnu.org; Tue, 31 Mar 2015 00:30:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycnor-00064N-5m for qemu-devel@nongnu.org; Tue, 31 Mar 2015 00:30:29 -0400 Message-ID: <551A22E2.60003@redhat.com> Date: Mon, 30 Mar 2015 22:30:26 -0600 From: Eric Blake MIME-Version: 1.0 References: <1427227433-5030-1-git-send-email-eblake@redhat.com> <871tk723lf.fsf@blackfin.pond.sub.org> In-Reply-To: <871tk723lf.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q4m1amKbMC7p69bSRuUwaqqBq49JLEbti" Subject: Re: [Qemu-devel] [PATCH v5 00/28] drop qapi nested structs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, lcapitulino@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, wenchaoqemu@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Q4m1amKbMC7p69bSRuUwaqqBq49JLEbti Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/29/2015 10:03 AM, Markus Armbruster wrote: > What happens when I define a member key multiple times in a struct or > union type? >=20 > If I do it directly, the parser rejects the duplicate key in > get_members(). Covered by tests/qapi-schema/duplicate-key.json. >=20 > What if I hide the duplicate in a base type? >=20 > If I stick this into qapi-schema-test.json: >=20 > { 'type': 'Base', 'data': { 'foo': 'str', 'bar': 'str' } } > { 'type': 'Clash', 'base': 'Base', 'data': { 'foo': 'int' } } > { 'command': 'clash', 'data': 'Clash' } >=20 > the resulting test-qmp-commands.h declares qmp_clash(), but > test-qmp-marshal.c doesn't define it. WTF?!? Nice test; I'll see if I can add a patch on to the end of the series to flag it. I suspect flat unions have potential for the same issue. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Q4m1amKbMC7p69bSRuUwaqqBq49JLEbti Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVGiLiAAoJEKeha0olJ0NqXKgH/joXDswcuZdSD0M5jXwnA02T QfHC8T7u2P9itPZ3h/HMzWsB3ByC7y7lmLekmSqk9FxV90pW0n7rOaparHc0R+TU gSvnlRZDVdGiBsLMsoVZL1y1g6D2KdpqhS29SXKTjAzzLnmUkaJEROcxMfmnDICa 55yxV801j3wNiv+a7TjWS4IvZ+crfJwNmyEAtQLZGPxLl/fNKtZXfBPZ+D/Gddd2 CNY1T0DOCizlAHYsIhAgHpwvF+Bmox+B3KE/cHasHoKHm3uepVP17nVw/9nvYRpl w/suqnPsQykrEw+hKViz4mbcGTm1NF9wdxhk2wtJPL5vgxPuvqN4Itje2/AZHio= =w6QW -----END PGP SIGNATURE----- --Q4m1amKbMC7p69bSRuUwaqqBq49JLEbti--