From patchwork Wed Jun 7 18:59:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 13271155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D36AC7EE23 for ; Wed, 7 Jun 2023 18:59:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232281AbjFGS7P (ORCPT ); Wed, 7 Jun 2023 14:59:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231766AbjFGS7O (ORCPT ); Wed, 7 Jun 2023 14:59:14 -0400 Received: from out-41.mta1.migadu.com (out-41.mta1.migadu.com [IPv6:2001:41d0:203:375::29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E5D01BEC for ; Wed, 7 Jun 2023 11:59:09 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1686164347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wzo9Zb54Peqok5A7q67D4Ki/JABbQcqy7ot1VdQjGro=; b=icMMB5lQ29Gl1dqFe4YUANxtj76I3r1N4oYp/pgJUvs5D/jR/AOakc9glTKblCht42IHet /t01CIWQ0bnmZ4AMNQUHZY6FWs3PFnmOdx1d90DwvAA2aZnLvR2HPQIS97p1WG03uTjTmv mgm6NHLA2ZAYjlwuCsZ3Itty3gWHsn4= From: Andrew Jones To: kvm@vger.kernel.org Cc: Paolo Bonzini , Thomas Huth , Nikos Nikoleris Subject: [kvm-unit-tests PATCH 1/3] arch-run: Extend timeout when booting with UEFI Date: Wed, 7 Jun 2023 20:59:03 +0200 Message-Id: <20230607185905.32810-2-andrew.jones@linux.dev> In-Reply-To: <20230607185905.32810-1-andrew.jones@linux.dev> References: <20230607185905.32810-1-andrew.jones@linux.dev> MIME-Version: 1.0 Content-type: text/plain X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Booting UEFI can take a long time. Give the timeout some extra time to compensate for it. Signed-off-by: Andrew Jones Reviewed-by: Nikos Nikoleris --- scripts/arch-run.bash | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 51e4b97b27d1..72ce718b1170 100644 --- a/scripts/arch-run.bash +++ b/scripts/arch-run.bash @@ -94,7 +94,17 @@ run_qemu_status () timeout_cmd () { + local s + if [ "$TIMEOUT" ] && [ "$TIMEOUT" != "0" ]; then + if [ "$CONFIG_EFI" = 'y' ]; then + s=${TIMEOUT: -1} + if [ "$s" = 's' ]; then + TIMEOUT=${TIMEOUT:0:-1} + ((TIMEOUT += 10)) # Add 10 seconds for booting UEFI + TIMEOUT="${TIMEOUT}s" + fi + fi echo "timeout -k 1s --foreground $TIMEOUT" fi }