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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B80F1D5D696 for ; Thu, 7 Nov 2024 22:32:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3547D8860B; Thu, 7 Nov 2024 23:32:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Jw1LTRNQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9DCC78885D; Thu, 7 Nov 2024 23:32:40 +0100 (CET) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 264D288606 for ; Thu, 7 Nov 2024 23:32:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-83ab5b4b048so59942139f.2 for ; Thu, 07 Nov 2024 14:32:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1731018756; x=1731623556; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=b28DHQ6TfaRqpGnVdSrua6CvKpuoLPo7nvsdJLD7qVk=; b=Jw1LTRNQYy1lB27/ryeLM14JGiLBFJGzvZdwka17lxP4nN5YI99re0V8/jJ3iIO6Jz M1J4Hbx2OlJcfXeRXn99b1SKHmAqR7KpPSKd8XqLOcD8UF4NqgIooK2bS46lq3RCTrI+ a3W0eTZg8WM5dcvhAEyqIpLVZUVUA0mFPlu5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731018756; x=1731623556; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b28DHQ6TfaRqpGnVdSrua6CvKpuoLPo7nvsdJLD7qVk=; b=vO458Bnlo/ov+gHPE+CLiv5gZvwQIol9NOcgQS4IFZEgBa8TNFvPJj6equ0uA8K8DF YOdA6zs2gI8e8glUr/rIiK/AZ2JYkPrgN7/Iu8RFunqEmIickR3yMUU9/iaLbnn2CCJp v6G99y06CaODL5lQMYYRiWZsvifxd3rfOAxhujcjFqs/hPzWuf7cNIXcDSuzDhcKnBm0 qbUmuyp4OlQHg8UQpM2nOZTGMVgGdBPOzz4AesolRDsu3A/ptj/Iqu+/lQE0/5BjQspj mPF31dlJKpf0IEh1Frw02BQtQQjNmtuNDo/LxLfuab/oAgi2jA1zY6w2BXlHDkytzf4W 69Kw== X-Gm-Message-State: AOJu0Yy6HnBMZeffaHBN26bfI7PtY7PultFx7YMJ/3n/rXTAuaQ3y2bc Xn8iJckXGrGltLIojHC7UjB3gZvPhVxic9GEuH+qn/T5ckZOKBiStttiwfrB/wJYqAYt8OafcJc = X-Google-Smtp-Source: AGHT+IEpFKKQmnCPZJA9yqfmopuQuUzc2Byc0zsQMZwZtIHvI8pvny2MFc9VabmgRLju8RoOsOxKQw== X-Received: by 2002:a05:6e02:198b:b0:3a6:ac17:13e9 with SMTP id e9e14a558f8ab-3a6f19e225amr12315665ab.11.1731018756221; Thu, 07 Nov 2024 14:32:36 -0800 (PST) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3a6ead31427sm5013485ab.72.2024.11.07.14.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 14:32:34 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Heinrich Schuchardt , Tom Rini , Simon Glass , AKASHI Takahiro , Caleb Connolly , Christian Marangi , Dan Carpenter , Francis Laniel , Guillaume La Roque , Jerome Forissier , Jiaxun Yang , Julien Masson , Julius Lehmann , Marek Vasut , Mark Kettenis , Masahisa Kojima , Mattijs Korpershoek , Michal Simek , Moritz Fischer , Patrick Rudolph , Sean Anderson , Shantur Rathore , Sughosh Ganu , =?UTF-8?q?Vincent=20Stehl=C3=A9?= , Yang Xiwen Subject: [PATCH v10 00/10] efi: Add a test for EFI bootmeth Date: Thu, 7 Nov 2024 15:32:18 -0700 Message-Id: <20241107223228.1914452-1-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The test coverage for the EFI bootmeth is incomplete since it does not actually boot the application. This series creates a simple test for this purpose. It includes a few patches to make this work: - Revert of an unreviewed patch to change the sandbox efi filename - Hang in sandbox virtio due to EFI probing all block devices Other necessary fixes have already been applied. Changes in v10: - Drop call to exit-boot-services - Rebase to -master - Specify the bootdev order, to avoid including cros device Changes in v9: - Update license - Fix 'sevices' typo - Move the function into efi_helper.c - Split out into a separate change - Split out into its own patch - Separate into separate patches - Add new patch to drop sandbox PXE architecture - Mark the image as complete after writing it - Fix 'sevices' typo Changes in v8: - Add new patch to control on-host behaviour - Add new patch to move default filename to a function - Add new patch to report host default-filename in native mode - Add new patch to report host default-filename in native mode Changes in v7: - Update commit message - Drop patches already applied - Drop patch 'Disable ANSI output for tests' - Rebase on -master Changes in v6: - Drop the patch to disable sandbox virtio blk with EFI - Add new patch to disable the sandbox virtio blk device - Deal with sandbox CONFIG_LOGF_FUNC - Rebase on -next - Drop patches previously applied - Drop mention of helloworld since it is no-longer used by this test Changes in v4: - Add efi_loader tag to some patches - Split out non-EFI patches into a different series Changes in v2: - Add many new patches to resolve all the outstanding test issues Simon Glass (10): efi_loader: Add a test app sandbox: Add a -N flag to control on-host behaviour efi: Move default filename to a function efi_loader: Move get_efi_pxe_arch() to efi_helper efi_loader: Allow reporting the host defaults sandbox: Report host default-filename in native mode efi_loader: Drop sandbox PXE architecture sandbox: virtio: Disable the sandbox virtio blk device test: efi: boot: Set up an image suitable for EFI testing test: efi: boot: Add a test for the efi bootmeth arch/Kconfig | 3 +- arch/sandbox/cpu/start.c | 10 ++++ arch/sandbox/dts/test.dts | 2 +- arch/sandbox/include/asm/state.h | 1 + boot/bootmeth_efi.c | 29 ++--------- cmd/efidebug.c | 25 +++++++++ include/efi.h | 34 +++++++++++++ include/efi_default_filename.h | 56 -------------------- lib/efi_loader/Kconfig | 10 ++++ lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_bootmgr.c | 10 ++-- lib/efi_loader/efi_helper.c | 71 ++++++++++++++++++++++++++ lib/efi_loader/testapp.c | 64 +++++++++++++++++++++++ test/boot/bootdev.c | 18 ++++++- test/boot/bootflow.c | 76 ++++++++++++++++++++++++++-- test/py/tests/bootstd/flash1.img.xz | Bin 0 -> 4924 bytes test/py/tests/test_ut.py | 53 ++++++++++++++++--- 17 files changed, 366 insertions(+), 97 deletions(-) delete mode 100644 include/efi_default_filename.h create mode 100644 lib/efi_loader/testapp.c create mode 100644 test/py/tests/bootstd/flash1.img.xz -- 2.34.1