From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIncf-0004Ab-7y for qemu-devel@nongnu.org; Thu, 21 Mar 2013 18:06:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIncZ-0002JC-1Q for qemu-devel@nongnu.org; Thu, 21 Mar 2013 18:06:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIncY-0002Iw-PJ for qemu-devel@nongnu.org; Thu, 21 Mar 2013 18:06:02 -0400 Message-ID: <514B8441.7050408@redhat.com> Date: Thu, 21 Mar 2013 16:05:53 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363890571-15146-1-git-send-email-stefanb@linux.vnet.ibm.com> <1363890571-15146-10-git-send-email-stefanb@linux.vnet.ibm.com> In-Reply-To: <1363890571-15146-10-git-send-email-stefanb@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2UKBHLDLNMRBMLTLQMIWR" Subject: Re: [Qemu-devel] [PATCH v4 9/9] ASN.1 specific test cases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: mst@redhat.com, coreyb@linux.vnet.ibm.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, jschopp@linux.vnet.ibm.com, anthony@codemonkey.ws This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UKBHLDLNMRBMLTLQMIWR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/21/2013 12:29 PM, Stefan Berger wrote: > BER visitor tests give us some assurance that the BER visitor > code works, and also end up by extention helping out on our s/extention/extension/ > code coverage of the filesystem tests. > After the output visitor invocation the resuling buffer is s/resuling/resulting/ > compared against a known byte stream -- this will lock the > implementation into producing specific byte arrays. >=20 > Signed-off-by: Stefan Berger > Signed-off-by: Joel Schopp > --- > tests/Makefile | 9 + > tests/test-ber-visitor.c | 746 +++++++++++++++++++++++++++++++++++++++= ++++++++ > 2 files changed, 755 insertions(+) > create mode 100644 tests/test-ber-visitor.c >=20 > +tests/test-ber-visitor.o: $(addprefix include/qapi/, ber.h ber-input-v= isitor.h ber-output-visitor.h) $(addprefix qapi/, ber-common.c ber-input-= visitor.c ber-output-visitor.c) > +tests/test-ber-visitor$(EXESUF): tests/test-ber-visitor.o $(tools-obj-= y) qapi/ber-output-visitor.o qapi/ber-input-visitor.o qapi/ber-common.o $= (block-obj-y) libqemuutil.a libqemustub.a Long lines - worth using backslash-newline continuation? > +++ b/tests/test-ber-visitor.c > @@ -0,0 +1,746 @@ > +/* > + * BER Output Visitor unit-tests. > + * > + * Copyright (C) 2011 Red Hat Inc. > + * Copyright (C) 2011 IBM Corporation It's 2013 (probably applies to other files earlier in the series, as well= ). > +static void test_visitor_out_string(TestInputOutputVisitor *data, > + const void *unused) > +{ > + char *string_in =3D (char *) "Q E M U", *string_out =3D NULL; Does the fact that you have to cast here... > + Error *errp =3D NULL; > + > + visit_type_str(data->ov, &string_in, NULL, &errp); =2E..indicate a lack of const-correctness on visit_type_str()? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2UKBHLDLNMRBMLTLQMIWR 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRS4RBAAoJEKeha0olJ0Nq7q8IAKQt/RZMY5I93EsMuyUJl/ff 6Pcd5EFVsrT1j3qgoiJZv82yq1EqEzgaxEruSk28UAoxE53stDEU2THu/cPstBM7 k9+Cct+uCk+ECPLEQNf6mo+Mr3bPAJvs5bp/bSP6NPIZZn0KBFPQncSQkExSjraz /AXJ1yTNGgbKJdSeL/7aWBrUXlNd7HLea2+O0PW3R2EvVfnqZVVNcpxj2pI8x8R0 GMKWILuPfK1y+1xJG0osUC9Q3VzQ0fVaHEUpp6N/GFhwjYJsq7fDkWvs0W+mIJqb ogRG4kdvYsOt1Y6v3pWazJH3x5Z1DONFwDuG0Df7XPuvgFSThVZpDkUVVDZqmyw= =Gz5K -----END PGP SIGNATURE----- ------enig2UKBHLDLNMRBMLTLQMIWR--