From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcGuy-0006dX-JC for qemu-devel@nongnu.org; Tue, 23 Aug 2016 14:59:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcGut-0007lo-W7 for qemu-devel@nongnu.org; Tue, 23 Aug 2016 14:59:24 -0400 References: <1471963560-1433-1-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <57BC9CFB.1090604@redhat.com> Date: Tue, 23 Aug 2016 13:59:07 -0500 MIME-Version: 1.0 In-Reply-To: <1471963560-1433-1-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CBBKDQl8RMbOsLPNFPG9D4APaKw6LxuEc" Subject: Re: [Qemu-devel] [PATCH] qemu-iotests: Log QMP traffic in debug mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CBBKDQl8RMbOsLPNFPG9D4APaKw6LxuEc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/23/2016 09:46 AM, Kevin Wolf wrote: > Python tests are already annoying enough to debug. With QMP traffic > available it's a little bit easier at least. >=20 > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/iotests.py | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests= =2Epy > index 03bccdd..3329bc1 100644 > --- a/tests/qemu-iotests/iotests.py > +++ b/tests/qemu-iotests/iotests.py > @@ -50,6 +50,7 @@ cachemode =3D os.environ.get('CACHEMODE') > qemu_default_machine =3D os.environ.get('QEMU_DEFAULT_MACHINE') > =20 > socket_scm_helper =3D os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_= helper') > +debug =3D False > =20 > def qemu_img(*args): > '''Run qemu-img and return the exit code''' > @@ -134,6 +135,8 @@ class VM(qtest.QEMUQtestMachine): > def __init__(self): > super(VM, self).__init__(qemu_prog, qemu_opts, test_dir=3Dtest= _dir, > socket_scm_helper=3Dsocket_scm_helper= ) > + if debug: > + self._debug =3D True > self._num_drives =3D 0 > =20 So we already had plumbing for debug... > def add_device(self, opts): > @@ -323,6 +326,8 @@ def verify_quorum(): > def main(supported_fmts=3D[], supported_oses=3D['linux']): > '''Run tests''' > =20 > + global debug =2E..but just needed to turn it on? At any rate, I agree that it is useful for figuring out when tests go wrong, so: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --CBBKDQl8RMbOsLPNFPG9D4APaKw6LxuEc 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/ iQEcBAEBCAAGBQJXvJz7AAoJEKeha0olJ0NqSo0H/iPeZPMmxO4df3fyveF5Qmhb n4wLCLpsNLAmJG8yNboFDVIaZcr5UX8J/l5KvB8ldh4aqGxcNMD+s0B6rRvks6Vi /Jg5pM0chGWq2aOERVNRC620aihCGxsenE2Wbyn2QG6CcIQN/cXeaGe6qovFx7cU /dgL/HC1WUjv8b2pJ/vD8BYyv2OgHNo4V6SE9EV3EaDCDCmYlTM0wmfAnBp3zFCy Aelt5GPP53Yxt4Kj3dC31JXTWW2B3CFsVGoAfRSpbuVuaLMoL5r1cSzezNx3/fcb /MvypAyTOoXkZ9H4efwJVefowwAiuM3Fefq1ZFpaxB2TfJhvnXHFWp7ivb+sQ58= =vqwz -----END PGP SIGNATURE----- --CBBKDQl8RMbOsLPNFPG9D4APaKw6LxuEc--