From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJ6WP-0000X4-M6 for qemu-devel@nongnu.org; Thu, 27 Feb 2014 14:21:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJ6WK-000177-FU for qemu-devel@nongnu.org; Thu, 27 Feb 2014 14:21:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJ6WK-00016i-79 for qemu-devel@nongnu.org; Thu, 27 Feb 2014 14:21:24 -0500 Message-ID: <530F902B.3010609@redhat.com> Date: Thu, 27 Feb 2014 12:21:15 -0700 From: Eric Blake MIME-Version: 1.0 References: <1393499376-4374-1-git-send-email-wenchaoqemu@gmail.com> <1393499376-4374-5-git-send-email-wenchaoqemu@gmail.com> In-Reply-To: <1393499376-4374-5-git-send-email-wenchaoqemu@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lL60uiS4fuiXXdvtUc0BMvmRxbE335W4f" Subject: Re: [Qemu-devel] [PATCH V8 04/10] qapi script: check correctness of union List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, kwolf@redhat.com, Wenchao Xia , armbru@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lL60uiS4fuiXXdvtUc0BMvmRxbE335W4f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/27/2014 04:09 AM, Wenchao Xia wrote: > From: Wenchao Xia >=20 > Signed-off-by: Wenchao Xia > Signed-off-by: Wenchao Xia Double-S-o-B. I've also noticed that I'm getting undeliverable mail rejections from your linux.vnet.ibm.com address: TCVM.MEGACENTER.DE.IBM.COM unable to deliver following mail to recipient(= s): TCVM.MEGACENTER.DE.IBM.COM received negative reply: 550 5.1.1 : Recipient address rejected: User unknown in local recipient table > --- > scripts/qapi.py | 106 ++++++++++++= +++++++- > tests/Makefile | 4 +- > diff --git a/scripts/qapi.py b/scripts/qapi.py > index 1954292..cea346f 100644 > --- a/scripts/qapi.py > +++ b/scripts/qapi.py > @@ -50,6 +50,15 @@ class QAPISchemaError(Exception): > def __str__(self): > return "%s:%s:%s: %s" % (self.fp.name, self.line, self.col, se= lf.msg) > =20 > +class QAPIExprError(Exception): > + def __init__(self, expr_info, msg): > + self.fp =3D expr_info['fp'] > + self.line =3D expr_info['line'] > + self.msg =3D msg > + > + def __str__(self): > + return "%s:%s: %s" % (self.fp.name, self.line, self.msg) > + > class QAPISchema: > =20 > def __init__(self, fp): > @@ -64,7 +73,10 @@ class QAPISchema: > self.accept() > =20 > while self.tok !=3D None: > - self.exprs.append(self.get_expr(False)) > + expr_info =3D {'fp': fp, 'line': self.line} > + expr_elem =3D {'expr': self.get_expr(False), > + 'info': expr_info} > + self.exprs.append(expr_elem) Should these two hunks be part of 3/10? Or at least as a separate patch? Or at least mentioned in the commit message? > @@ -162,6 +174,89 @@ class QAPISchema: > raise QAPISchemaError(self, 'Expected "{", "[" or string')= > return expr > =20 > +def find_base_fields(base): > + base_struct_define =3D find_struct(base) > + if not base_struct_define: > + return None > + return base_struct_define['data'] > + > +# Return the discriminator enum define if discrminator is specified as= an s/discrminator/discriminator/ --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --lL60uiS4fuiXXdvtUc0BMvmRxbE335W4f 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/ iQEcBAEBCAAGBQJTD5ArAAoJEKeha0olJ0Nqhm4H/2bLfV2flC49f5x9cu1Mc9Zs dBgH02wrFeaBF1ltMTS/D0pVFNDej5fKHnASv8LUa9Fwn+WWM73ydJvjx4HHJTQg 3afTLQNlO1TOu16Wwfr+5geOBVGJ3ZUeua0TBN9T32Dr1P/4D1cdgG6EMaC/BbcE qMQByuYjoFMgb0UgNBjh2V51lBlf2NthdB2UMPxLmyMVAvgcJcXS1z0UsbdWYPqY LjtPOc4ZBDG40jR2tU570eZa3RDcxjsJN8ybTP6/NG2QWzOhIbqUxVQ1hP4yxTIF dE2NKoZdEqOJByIBVBCcQDMHCxl0IqUGyIZTjAWoF7xhZe3L6W99L/OK5djX9Yk= =I83J -----END PGP SIGNATURE----- --lL60uiS4fuiXXdvtUc0BMvmRxbE335W4f--