From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [kvm-unit-tests PATCH 3/3] add timeout support Date: Mon, 21 Dec 2015 18:04:20 +0100 Message-ID: <20151221170419.GA12725@potion.redhat.com> References: <1450383054-9724-1-git-send-email-drjones@redhat.com> <1450383054-9724-4-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, pbonzini@redhat.com To: Andrew Jones Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48135 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751639AbbLUREX (ORCPT ); Mon, 21 Dec 2015 12:04:23 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B43EA3B759 for ; Mon, 21 Dec 2015 17:04:23 +0000 (UTC) Content-Disposition: inline In-Reply-To: <1450383054-9724-4-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2015-12-17 14:10-0600, Andrew Jones: > Signed-off-by: Andrew Jones > --- > diff --git a/arm/run b/arm/run > @@ -75,10 +75,14 @@ chr_testdev+=3D' -device virtconsole,chardev=3Dct= d -chardev testdev,id=3Dctd' > M+=3D",accel=3D$ACCEL" > command=3D"$qemu $M -cpu $processor $chr_testdev" > command+=3D" -display none -serial stdio -kernel" > -echo $command "$@" > + > +if [ "$TIMEOUT" ]; then > + timeout_cmd=3D"timeout --foreground $TIMEOUT" (command=3D"timeout --foreground $TIMEOUT $command" # to keep the clutt= er down.) > +fi (We paste it three times, so I'd rather see this abstracted in a "scripts/" library.) > diff --git a/run_tests.sh b/run_tests.sh > @@ -21,6 +21,7 @@ function run() > + local timeout=3D"${9:-$TIMEOUT}" > diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh > @@ -97,8 +98,12 @@ if [ "\$QEMU" ]; then > +if [ "$timeout" ]; then > + timeout_cmd=3D'timeout --foreground $timeout' Both would be nicer if they took the TIMEOUT variable as an override. We already don't do that for accel and the patch seems ok in other regards, Reviewed-by: Radim Kr=C4=8Dm=C3=A1=C5=99