From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7lnk-0008Es-2b for qemu-devel@nongnu.org; Thu, 17 Jul 2014 09:32:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7lna-0002ur-JU for qemu-devel@nongnu.org; Thu, 17 Jul 2014 09:32:48 -0400 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:45440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7lna-0002uc-Cb for qemu-devel@nongnu.org; Thu, 17 Jul 2014 09:32:38 -0400 Received: by mail-we0-f180.google.com with SMTP id w61so2889085wes.11 for ; Thu, 17 Jul 2014 06:32:36 -0700 (PDT) Date: Thu, 17 Jul 2014 14:32:34 +0100 From: Stefan Hajnoczi Message-ID: <20140717133234.GC25107@stefanha-thinkpad.redhat.com> References: <1404757089-4836-1-git-send-email-jsnow@redhat.com> <1404757089-4836-3-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sHrvAb52M6C8blB9" Content-Disposition: inline In-Reply-To: <1404757089-4836-3-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH 02/28] libqtest: add QTEST_LOG for debugging qtest testcases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com --sHrvAb52M6C8blB9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 07, 2014 at 02:17:43PM -0400, John Snow wrote: > QDict *qtest_qmp_receive(QTestState *s) > { > QMPResponseParser qmp; > + bool log =3D getenv("QTEST_LOG") !=3D NULL; > =20 > qmp.response =3D NULL; > json_message_parser_init(&qmp.parser, qmp_response); > @@ -375,6 +377,9 @@ QDict *qtest_qmp_receive(QTestState *s) > exit(1); > } > =20 > + if (log) { > + len =3D write(2, &c, 1); > + } > json_message_parser_feed(&qmp.parser, &c, 1); > } Is the QMP command also logged or are we just logging the response? Stefan --sHrvAb52M6C8blB9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTx9ByAAoJEJykq7OBq3PIp7QIAKq1dp3hcTYKM0gFD5uPsa3G 5kIf+THbze9iEtQCGy8U72xyiqAdMaOATGiS5+3iUNXIDxDvXP7nldVlIEcFTfg+ 26At88QlLV2cbie5LD41N1l8kWCv1/MXT+7RAzfWFk1vpxely+qrFnBaQCvynIq/ KtDiTX9rjIH+dnjTJ4lAqsbUerTQ2InwaGJJORSmMco1Y7b298hdxRkOUrrsO7d/ ITiNW8EZWE06f78OBb5ySNTfQ7z+ENXABrd8qBa+ASt2d2ZldSqNtB4LrsPt8wtU LRrw72uF/bXVqQksegDdk5Hzst1vtdx4QpTKwqUpUz8YmzmUTKi/EBQaV+wWOiA= =g3xs -----END PGP SIGNATURE----- --sHrvAb52M6C8blB9--