From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXhQV-0000JO-DJ for qemu-devel@nongnu.org; Thu, 03 Sep 2015 23:12:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXhQU-0007w6-Aq for qemu-devel@nongnu.org; Thu, 03 Sep 2015 23:12:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXhQT-0007vz-T2 for qemu-devel@nongnu.org; Thu, 03 Sep 2015 23:12:30 -0400 References: <1441290623-13631-1-git-send-email-armbru@redhat.com> <1441290623-13631-31-git-send-email-armbru@redhat.com> <55E8FBE4.4050307@redhat.com> From: Eric Blake Message-ID: <55E90C1C.9050802@redhat.com> Date: Thu, 3 Sep 2015 21:12:28 -0600 MIME-Version: 1.0 In-Reply-To: <55E8FBE4.4050307@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3RRlN9gSbF2F6ltQpajU5rh3Ei0DkTX2A" Subject: Re: [Qemu-devel] [PATCH RFC v4 30/32] qapi: New QMP command query-schema for QMP schema introspection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3RRlN9gSbF2F6ltQpajU5rh3Ei0DkTX2A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/03/2015 08:03 PM, Eric Blake wrote: > On 09/03/2015 08:30 AM, Markus Armbruster wrote: >> qapi/introspect.json defines the introspection schema. It's designed >> for QMP introspection, but should do for similar uses, such as QGA. >=20 > [review in this sub-thread; for comments on 'int' munging or other > followups, see other subthread] >=20 > There is at least one definite bug (see multiple references below to > [1]), and several ideas for cleanups, but in general, I think that the > remaining changes are going to be small enough that I'd probably be oka= y > if v5 started life with: > Reviewed-by: Eric Blake > (Of course, you have every right to not add the R-b, especially if you > want me to do another close review :) >=20 >=20 >> + >> + { "name": "BlockdevOptions", "meta-type": "object", >> + "members": [ >> + { "name": "kind", "type": "BlockdevOptionsKind" } ], >=20 > [1] Ouch. That should be "name": "type". I pointed out the bug in v3,= > but it looks like it still hasn't been fixed. Or rather, that our > attempt to fix it wasn't correct. >=20 >> + def _gen_variants(self, tag_name, variants): >> + return {'tag': tag_name or 'type', >=20 > [1] Ouch. Why are we still printing 'kind' as the name for simple > unions? Oh, it's because tag_name is ALWAYS provided by the visitor, s= o > the "or 'type'" clause never fires. Not quite the right comment. 'tag' is being output correctly (tag_name was indeed None), what was wrong was the 'members':[] array (which was assuming the member was named 'kind'). > I have a pending patch to change > the C code to generate 'type' as the C code name to match the wire ABI;= > but until that patch is in, I think a hack solution might be to fix the= > visitor to supply None instead of a tag_name for simple unions. I'll > respond to the appropriate earlier patch. Rather, 3 earlier patches. See my comments on 2, 10, and 11. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3RRlN9gSbF2F6ltQpajU5rh3Ei0DkTX2A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV6QwcAAoJEKeha0olJ0Nq3EIH/iGYOcFiFJa9RZRAeiKUI/Uz CJAZQPF+eKzBJqfsldBuPHVyuROebk+I/S6hOU0uzj+iZTK8YpDngC7vOcT57+wS bbedukbxinzwUXt1zM0FptwrucgzYog2MqMScHRFpg51pbXJaytZPPzD8nJ/YyJ4 k0JfwvMFdC22mFHPjaGBCbs2T+cacqCBbDscofDPGeCgS9o+gz9PM07eFABsgfAC uJO9n2CmZJymDuTXRSyp+8pxtvMXR8oSNYpgwVfWHk0Jk0RgW2b3DipX9eRJKPTf iwkqYZo96GSRb3hFJRppSVfHWsfn+STtScr5ETuxQDY9EXjt4Khu1/1q7S/imok= =Fb4D -----END PGP SIGNATURE----- --3RRlN9gSbF2F6ltQpajU5rh3Ei0DkTX2A--