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 } From patchwork Wed Jun 7 18:59:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 13271153 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 B00F8C77B7A for ; Wed, 7 Jun 2023 18:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231697AbjFGS7M (ORCPT ); Wed, 7 Jun 2023 14:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjFGS7L (ORCPT ); Wed, 7 Jun 2023 14:59:11 -0400 Received: from out-7.mta0.migadu.com (out-7.mta0.migadu.com [91.218.175.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B801C1BF1 for ; Wed, 7 Jun 2023 11:59:10 -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=1686164348; 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=R2mcgVGU7qYfFK9K8YC8zHT3+BWJ0PSMo7hBgDcImhE=; b=Ik8znPXcXHK6uVj4HvcnKJrCGaEylCpGijJYBnYQpYry7Gz/ZH/uRVSK/Vfi/jQBcS/lNv smKTkTmPIBQ4/Dlm5ULPlPKW4g2DhyTfrZJrui2dgakzp/5bEpXjHrqntDQfDhEZUMjqvu 4uco64pHnw7lOmmEbjalcp+rT3slaNE= From: Andrew Jones To: kvm@vger.kernel.org Cc: Paolo Bonzini , Thomas Huth , Nikos Nikoleris Subject: [kvm-unit-tests PATCH 2/3] arm/efi/run: Add Fedora's path to QEMU_EFI Date: Wed, 7 Jun 2023 20:59:04 +0200 Message-Id: <20230607185905.32810-3-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 Try Fedora's default path too. Signed-off-by: Andrew Jones Reviewed-by: Nikos Nikoleris --- arm/efi/run | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arm/efi/run b/arm/efi/run index c61da31183a7..f75ef157acf3 100755 --- a/arm/efi/run +++ b/arm/efi/run @@ -15,8 +15,14 @@ source config.mak source scripts/arch-run.bash source scripts/common.bash +if [ -f /usr/share/qemu-efi-aarch64/QEMU_EFI.fd ]; then + DEFAULT_UEFI=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd +elif [ -f /usr/share/edk2/aarch64/QEMU_EFI.silent.fd ]; then + DEFAULT_UEFI=/usr/share/edk2/aarch64/QEMU_EFI.silent.fd +fi + : "${EFI_SRC:=$(realpath "$(dirname "$0")/../")}" -: "${EFI_UEFI:=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd}" +: "${EFI_UEFI:=$DEFAULT_UEFI}" : "${EFI_TEST:=efi-tests}" : "${EFI_CASE:=$(basename $1 .efi)}" : "${EFI_VAR_GUID:=97ef3e03-7329-4a6a-b9ba-6c1fdcc5f823}" @@ -24,9 +30,8 @@ source scripts/common.bash [ "$EFI_USE_ACPI" = "y" ] || EFI_USE_DTB=y if [ ! -f "$EFI_UEFI" ]; then - echo "UEFI firmware not found: $EFI_UEFI" - echo "Please install the UEFI firmware to this path" - echo "Or specify the correct path with the env variable EFI_UEFI" + echo "UEFI firmware not found." + echo "Please specify the path with the env variable EFI_UEFI" exit 2 fi From patchwork Wed Jun 7 18:59:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 13271156 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 E44EEC7EE43 for ; Wed, 7 Jun 2023 18:59:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232684AbjFGS7Q (ORCPT ); Wed, 7 Jun 2023 14:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232353AbjFGS7O (ORCPT ); Wed, 7 Jun 2023 14:59:14 -0400 Received: from out-51.mta0.migadu.com (out-51.mta0.migadu.com [91.218.175.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3784C1BF0 for ; Wed, 7 Jun 2023 11:59:12 -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=1686164350; 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=kXcUsr/5wRJ9hTwACI2tN3o6lvHyW3B8pfUxohWgjWU=; b=CK9LU4HYoKd2rL4vxoP39KUduVeZuXnIJXKFg1Rf/tVXsLBttas2G0Ek9jP5QpbF6otxA1 wcO2eW8Iopc6+m1qDEIeDnrodNkUpno7rZRm/QwyjODo+0v+8iaNFQazcf27YzhOl+QXLj nzrTjlByXjfuYH6/PEiiSEXjk6rIIpA= From: Andrew Jones To: kvm@vger.kernel.org Cc: Paolo Bonzini , Thomas Huth , Nikos Nikoleris Subject: [kvm-unit-tests PATCH 3/3] configure: efi: Link correct run script Date: Wed, 7 Jun 2023 20:59:05 +0200 Message-Id: <20230607185905.32810-4-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 EFI built tests use $TEST_DIR/efi/run, not $TEST_DIR/run. Also, now that we may be using the link, rather than the script directly, make sure we use an absolute path to the EFI source rather than assuming it's the parent directory. TEST_DIR already points there, so we can just use that. Signed-off-by: Andrew Jones Reviewed-by: Nikos Nikoleris --- arm/efi/run | 2 +- configure | 5 ++++- x86/efi/run | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arm/efi/run b/arm/efi/run index f75ef157acf3..6872c337c945 100755 --- a/arm/efi/run +++ b/arm/efi/run @@ -21,7 +21,7 @@ elif [ -f /usr/share/edk2/aarch64/QEMU_EFI.silent.fd ]; then DEFAULT_UEFI=/usr/share/edk2/aarch64/QEMU_EFI.silent.fd fi -: "${EFI_SRC:=$(realpath "$(dirname "$0")/../")}" +: "${EFI_SRC:=$TEST_DIR}" : "${EFI_UEFI:=$DEFAULT_UEFI}" : "${EFI_TEST:=efi-tests}" : "${EFI_CASE:=$(basename $1 .efi)}" diff --git a/configure b/configure index b665f7d586c2..6ee9b27a6af2 100755 --- a/configure +++ b/configure @@ -313,7 +313,10 @@ if [ ! -d "$srcdir/$testdir" ]; then echo "$testdir does not exist!" exit 1 fi -if [ -f "$srcdir/$testdir/run" ]; then + +if [ "$efi" = "y" ] && [ -f "$srcdir/$testdir/efi/run" ]; then + ln -fs "$srcdir/$testdir/efi/run" $testdir-run +elif [ -f "$srcdir/$testdir/run" ]; then ln -fs "$srcdir/$testdir/run" $testdir-run fi diff --git a/x86/efi/run b/x86/efi/run index 322cb7567fdc..85aeb94fe605 100755 --- a/x86/efi/run +++ b/x86/efi/run @@ -13,7 +13,7 @@ if [ ! -f config.mak ]; then fi source config.mak -: "${EFI_SRC:=$(realpath "$(dirname "$0")/../")}" +: "${EFI_SRC:=$TEST_DIR}" : "${EFI_UEFI:=/usr/share/ovmf/OVMF.fd}" : "${EFI_TEST:=efi-tests}" : "${EFI_SMP:=1}"