From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adi28-0004Fr-69 for qemu-devel@nongnu.org; Wed, 09 Mar 2016 12:36:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adi27-0008EE-4h for qemu-devel@nongnu.org; Wed, 09 Mar 2016 12:36:28 -0500 References: <4dd987be27d42483f90820e5fd1360c9d7d26af2.1457539274.git.berto@igalia.com> From: Max Reitz Message-ID: <56E05F16.2000306@redhat.com> Date: Wed, 9 Mar 2016 18:36:22 +0100 MIME-Version: 1.0 In-Reply-To: <4dd987be27d42483f90820e5fd1360c9d7d26af2.1457539274.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hjvu2XujO9Xn6nRbfNx9edOnClGaUxRd0" Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] iotests: Add test for QMP event rates List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hjvu2XujO9Xn6nRbfNx9edOnClGaUxRd0 Content-Type: multipart/mixed; boundary="WBPWocb8GvaXunLtlDRiR1wGseEKelH4u" From: Max Reitz To: Alberto Garcia , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org Message-ID: <56E05F16.2000306@redhat.com> Subject: Re: [Qemu-block] [PATCH 4/4] iotests: Add test for QMP event rates References: <4dd987be27d42483f90820e5fd1360c9d7d26af2.1457539274.git.berto@igalia.com> In-Reply-To: <4dd987be27d42483f90820e5fd1360c9d7d26af2.1457539274.git.berto@igalia.com> --WBPWocb8GvaXunLtlDRiR1wGseEKelH4u Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 09.03.2016 17:11, Alberto Garcia wrote: > This test verifies that the rate-limited QMP events are emitted at a > maximum rate of 1 per second as defined in monitor_qapi_event_conf in > monitor.c >=20 > It also checks that QUORUM_REPORT_BAD events generated from different > nodes are kept in separate queues so they don't mask each other. >=20 > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/146 | 129 +++++++++++++++++++++++++++++++++++++= ++++++++ > tests/qemu-iotests/146.out | 5 ++ > tests/qemu-iotests/group | 1 + > 3 files changed, 135 insertions(+) > create mode 100644 tests/qemu-iotests/146 > create mode 100644 tests/qemu-iotests/146.out >=20 > diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146 > new file mode 100644 > index 0000000..30bc379 > --- /dev/null > +++ b/tests/qemu-iotests/146 [...] > + # I/O errors in different children: all events are emitted > + delay =3D 2 * event_rate > + for i in range(len(imgs)): > + self.vm.hmp_qemu_io("drive0", "aio_read %d %d" % > + ((offset + i) * sector_size, sector_si= ze)) > + self.vm.qtest("clock_step %d" % delay) > + self.do_check_event('img%d' % i, offset + i) > + A self.vm.qtest("clock_step %d" % (2 * event_rate)) may be useful here, but it's not necessary. Reviewed-by: Max Reitz > + # No more pending events > + self.do_check_event(None) > + > +if __name__ =3D=3D '__main__': > + iotests.main(supported_fmts=3D["raw"]) --WBPWocb8GvaXunLtlDRiR1wGseEKelH4u-- --hjvu2XujO9Xn6nRbfNx9edOnClGaUxRd0 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 iQEcBAEBCAAGBQJW4F8WAAoJEDuxQgLoOKytD7oH/1oCGcLEHjB6xbQVXJs+2OZ9 UN5hoyJboYVD2WFfY2y2/J9KZt8X84CaLCYr8BPdLnIZniBHBAJIy8g8Ya6x7oCp ZQ5CixICl4wyhRAcZUUKsPS3ETxus2UM7VDkADVNJ1E8cfULFWiA9i+ttquQ/m30 t1nobDGUKKoZPH6wHVMbzWNTN+UxqtdCei6Aq56CNoLFFXu+yPhXsFkyGFEcxTSx LUS1JFeoVMcxumIKyEUZ099JZrs/ZAP4y2vccqN4x6xrhEKQ2Whi0qVDKTcSTeCa EbmGrcZz2mYpqGpoJnzFHi36q8/WNxLW4Y0Fe5Lk5s16jx/nd3EcRgLvTH9yWDc= =b2yx -----END PGP SIGNATURE----- --hjvu2XujO9Xn6nRbfNx9edOnClGaUxRd0--