From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJMaS-0008Ji-5P for qemu-devel@nongnu.org; Mon, 18 Aug 2014 09:03:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJMaM-0000Gu-4h for qemu-devel@nongnu.org; Mon, 18 Aug 2014 09:03:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJMaL-0000Gm-Tw for qemu-devel@nongnu.org; Mon, 18 Aug 2014 09:02:54 -0400 Date: Mon, 18 Aug 2014 14:02:45 +0100 From: Stefan Hajnoczi Message-ID: <20140818130245.GA1273@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 2/2] runner: Kill a program under test by time-out List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Maria Kustova Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, Maria Kustova --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 15, 2014 at 05:55:49PM +0400, Maria Kustova wrote: > Signed-off-by: Maria Kustova > --- > tests/image-fuzzer/runner.py | 29 +++++++++++++++++++++++++---- > 1 file changed, 25 insertions(+), 4 deletions(-) >=20 > diff --git a/tests/image-fuzzer/runner.py b/tests/image-fuzzer/runner.py > index 688d470..4399529 100755 > --- a/tests/image-fuzzer/runner.py > +++ b/tests/image-fuzzer/runner.py > @@ -65,14 +65,35 @@ def run_app(fd, q_args): > """Start an application with specified arguments and return its exit= code > or kill signal depending on the result of execution. > """ > + > + class Alarm(Exception): > + """Exception for signal.alarm events.""" > + pass > + > + def handler(*arg): > + """Notify that an alarm event occurred.""" > + raise Alarm > + > + signal.signal(signal.SIGALRM, handler) > + signal.alarm(300) What is the purpose of this patch? The hardcoded 5-minute timeout suggests you're trying to catch runaway processes. So this has nothing to do with the new --duration option? Stefan --envbJBWh7q8WU6mo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT8fl1AAoJEJykq7OBq3PIeqcIALvzxFixk1KBBHNxTGQjkkOd qfkonJrxdZxg0ft5BnXFqoLSDxj3VYBQd4c2R/IVABhzICqcKg1lSkTg9iJ1LtRP Vhv6mvW172Hq+IR1UtYe1V2ycpiDYQdYuCDU/moGfHIVdJW0aRGjxXhUN4VDLPB2 RhQ/BEehiMinivGf8EftxDpR/l5k0q8Wfu0uSmFy5g3l91zeVYctFy50LlkrePrh e9WYBu+Hs6+ZjpoWb4QEVYaPMvzmBZkCcD5ie8qjpSVnmMDjNYy1CtTXJnPd3UGs 0V4Yoidp3MjYM+89N4c+UdgO2rRQdJp8AGWsrrvfiepT4Sj7lhwQ5nZKsCLhiHk= =I63L -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo--