From nobody Sat Apr 27 04:11:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486739794834436.1037212806041; Fri, 10 Feb 2017 07:16:34 -0800 (PST) Received: from localhost ([::1]:44385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccCw5-0006Lj-KW for importer@patchew.org; Fri, 10 Feb 2017 10:16:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccCuh-0005XE-Oa for qemu-devel@nongnu.org; Fri, 10 Feb 2017 10:15:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccCud-0005RW-LB for qemu-devel@nongnu.org; Fri, 10 Feb 2017 10:15:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36354) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ccCud-0005RQ-Fh; Fri, 10 Feb 2017 10:15:03 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 867A6C057FA9; Fri, 10 Feb 2017 15:15:02 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-117-19.ams2.redhat.com [10.36.117.19]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1AFF0Mq025569; Fri, 10 Feb 2017 10:15:01 -0500 From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Date: Fri, 10 Feb 2017 16:14:59 +0100 Message-Id: <1486739699-1076-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 10 Feb 2017 15:15:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] tests/prom-env: Ease time-out problems on slow hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Peter Maydell recently ran into time-out problems with the prom-env test on a rather slow ARM board. To tackle this issue, we can speed up the test by running QEMU with "-nodefaults" for the pseries machine, so that SLOF has less devices to scan during boot, and by using the "nvramrc" environment variable instead of "boot-command", since this variable is evaluated earlier in the boot process. And to be really sure that we do not face such time out problems again, let's also increase the time out value from 100s to 120s instead. Signed-off-by: Thomas Huth --- v2: Use "-nodefaults" only for the pseries machine, since the sparc machines have a built-in ethernet controller and spill out a warning otherwise. tests/prom-env-test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c index 0ba6f48..bd33bc3 100644 --- a/tests/prom-env-test.c +++ b/tests/prom-env-test.c @@ -30,8 +30,8 @@ static void check_guest_memory(void) uint32_t signature; int i; =20 - /* Poll until code has run and modified memory. Wait at most 30 second= s */ - for (i =3D 0; i < 10000; ++i) { + /* Poll until code has run and modified memory. Wait at most 120 secon= ds */ + for (i =3D 0; i < 12000; ++i) { signature =3D readl(ADDRESS); if (signature =3D=3D MAGIC) { break; @@ -45,9 +45,14 @@ static void check_guest_memory(void) static void test_machine(const void *machine) { char *args; + const char *extra_args; =20 - args =3D g_strdup_printf("-M %s,accel=3Dtcg -prom-env 'boot-command=3D= %x %x l!'", - (const char *)machine, MAGIC, ADDRESS); + /* The pseries firmware boots much faster without the default devices = */ + extra_args =3D strcmp(machine, "pseries") =3D=3D 0 ? "-nodefaults" : "= "; + + args =3D g_strdup_printf("-M %s,accel=3Dtcg %s -prom-env 'use-nvramrc?= =3Dtrue' " + "-prom-env 'nvramrc=3D%x %x l!' ", + (const char *)machine, extra_args, MAGIC, ADDRE= SS); =20 qtest_start(args); check_guest_memory(); --=20 1.8.3.1