From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoH3A-0005cK-2a for qemu-devel@nongnu.org; Fri, 01 May 2015 15:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoH36-0001qP-T4 for qemu-devel@nongnu.org; Fri, 01 May 2015 15:56:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoH36-0001qB-LX for qemu-devel@nongnu.org; Fri, 01 May 2015 15:56:36 -0400 Message-ID: <5543DA48.8050507@redhat.com> Date: Fri, 01 May 2015 13:55:52 -0600 From: Eric Blake MIME-Version: 1.0 References: <1430312814-19706-1-git-send-email-eblake@redhat.com> <1430312814-19706-23-git-send-email-eblake@redhat.com> In-Reply-To: <1430312814-19706-23-git-send-email-eblake@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oP6K6m3dsPrmAVAq8dMT33O0rLjA3drXJ" Subject: Re: [Qemu-devel] [PATCH v7 22/39] qapi: Unify type bypass and add tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, berto@igalia.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oP6K6m3dsPrmAVAq8dMT33O0rLjA3drXJ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/29/2015 07:06 AM, Eric Blake wrote: > For a few QMP commands, we are forced to pass an arbitrary type > without tracking it properly in QAPI. Among the existing clients, > this unnamed type was spelled 'dict', 'visitor', and '**'; this > patch standardizes on '**', matching the documentation changes > earlier in the series. >=20 > Meanwhile, for both 'gen' and 'success-response' keys, we have been > ignoring the value, although the schema consistently used "'no'". True for 'gen', not quite true for 'success-response' (where we looked specifically for the value 'no'). > But now that we can support a literal "false" in the schema, we > might as well use that rather than ignoring the value or > special-casing a random string. Note that these are one-way > switches (use of 'gen':true is not the same as omitting 'gen'). > Also, the use of '**' requires 'gen':false, but the use of > 'gen':false does not mandate the use of '**'. >=20 > There is no difference to the generated code. Add some tests on > what we'd like to guarantee, although it will take later patches > to clean up test results and actually enforce the use of a bool > parameter. There was no difference to the QMP generated code, but I caused a regression with the QGA code. I'll post a followup that should be squashed into this patch. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --oP6K6m3dsPrmAVAq8dMT33O0rLjA3drXJ 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/ iQEcBAEBCAAGBQJVQ9pIAAoJEKeha0olJ0NqEBIH/RcNE5rXzPgZ4kL34HYOgatq W70aTvSp2l4pN+h0ApEKWYyy3EuGZPxrTa7dm51dORSd50eoBAXRMteMrH6di0C0 lMMMeSP1ITXg+wuJPhkaPU1g5iXEPlSDaKx1mO2+fairxD+LepFM5jyXhmov3a02 zkZk642zVKIb5xji6eJyEVOiZJ4YmC/xQVJzRHDXZgMsGRk2tlzR9ixRgFMMhC3X nMSNzoy7eBYjO0jxHnkfDKEhSYoiD6FoiYCg0Y3K+rgK6sHuwwmJz7kObV0TiQVi OQyZ9k1+bNHAJowiJfEJ3zmCGvYm+Ow+bvgXkrLIlnue1tzQ7Vi+c7SDaMG0jU4= =Xmp0 -----END PGP SIGNATURE----- --oP6K6m3dsPrmAVAq8dMT33O0rLjA3drXJ--