From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHu2S-0007KW-BH for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHu2K-0003lf-3u for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:21:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHu2J-0003lV-S4 for qemu-devel@nongnu.org; Thu, 14 Aug 2014 08:21:44 -0400 Message-ID: <53ECA9D3.6030103@redhat.com> Date: Thu, 14 Aug 2014 06:21:39 -0600 From: Eric Blake MIME-Version: 1.0 References: <1407287673-20308-1-git-send-email-eblake@redhat.com> <1407287673-20308-4-git-send-email-eblake@redhat.com> <87vbpvjugg.fsf@blackfin.pond.sub.org> In-Reply-To: <87vbpvjugg.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0w4a7eEqHrtRgf5iAE6iTWHPRu2gf8q5m" Subject: Re: [Qemu-devel] [PATCH v3 03/14] qapi: add some enum tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Luiz Capitulino , Fam Zheng , qemu-devel@nongnu.org, wenchaoqemu@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0w4a7eEqHrtRgf5iAE6iTWHPRu2gf8q5m Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/14/2014 03:23 AM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> Demonstrate that the qapi generator doesn't deal well with enums >> that aren't up to par. Later patches will update the expected >> results as the generator is made stricter. >> >> * tests/qapi-schema/enum-empty.*: New files. >> * tests/qapi-schema/enum-missing-data.*: Likewise. >> * tests/qapi-schema/enum-wrong-data.*: Likewise. >> * tests/Makefile (check-qapi-schema-y): Run them. >> >> +++ b/tests/qapi-schema/enum-wrong-data.out >> @@ -0,0 +1,3 @@ >> +[OrderedDict([('enum', 'MyEnum'), ('data', OrderedDict([('value', 'st= r')]))])] >> +[{'enum_name': 'MyEnum', 'enum_values': OrderedDict([('value', 'str')= ])}] >> +[] >=20 > For tests demonstrating incorrect behavior, a comment describing the > expected behavior is always welcome. Okay, I'll add comments to the .json files that expose weaknesses, when submitting v4 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --0w4a7eEqHrtRgf5iAE6iTWHPRu2gf8q5m 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 iQEcBAEBCAAGBQJT7KnTAAoJEKeha0olJ0NqEQ0H/jGEQhk8k+V97labt2q3Lwwx GPNpPWBfOZtkb8BB4cGqV37DUY0jhZQK0ZYR+pSTmow8I8f9yJNyzhrCawic+72V NyT7GxulIDKfregwzCInAdXQ1V7qJ9O1bw8etKd2bKkSrUB6rmGttBzvtDm1vQ89 WSVIOTv+ujMUqua+07OgguU90KDTeXH/ACEMYCb60Hh/H/L6hMFvt/S343ke5Cs1 tw3j3qwJnZq2ZqAyncuGvkn15f7NksdudOfAfJccM9pwyUDJywYsTCU7bI1vb/k3 K4SY53zKS4fYXLeRw9xrxBAVBOcjV8ng7g5hFItAzuQHtTcQeyRfEO1D7j3eM0k= =tkW7 -----END PGP SIGNATURE----- --0w4a7eEqHrtRgf5iAE6iTWHPRu2gf8q5m--