From patchwork Sat Mar 14 23:16:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1985 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530271; bh=7w/q90wF7BlmF4B3qAB9sp3Szx9UvnGcRmCZNV4KxI4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PACRWTnwr3DtElkF3BHszMCB/FAV7S/zDiC9hgAz3osoqLfqfCDsmtRlxF7iH0Gwv BCGidIDDwUGhV6jwkmmdh/UjfMg7VkJO4Nh9Lfsmou+90SM3fPD5i8AM85f8YEviE4 EcBLqz7Af5jIprN2ftVZezcTCs19+1+IKgc7ySK95TIJcsWRSH/4cnZ0ox8+dCOlVn fUq5PQ8+jhp8MLLmjwUmYCUOlUeQYvOZ8VR6xGO0lrlVeD3VdEGl8XIB2XhrTGEeAC 8LSp0iGYE/qanU/tizxGD/vBle9/bATKANv6QKIhR/3Ekrrr/IKLtKardp5vxyuqca jge+7dfSTYoXw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 49AF96A05C for ; Sat, 14 Mar 2026 17:17:51 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id SQTgXezTUBpW for ; Sat, 14 Mar 2026 17:17:51 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530269; bh=7w/q90wF7BlmF4B3qAB9sp3Szx9UvnGcRmCZNV4KxI4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=nyePvsNGJRa6n//4imrdkMzvduqRklEj01+jGMxWOj7BrD+rHCJT1j19xecGdPBqX oafjoNhITI5jxEAM+gD84apqoJ3iZr5fxf+re6XjeTDyngkTucyXkdwVTrCN/BX3uN 0AydcB80Dtnq6P3eVBqZ8Zvj5S0locvWWwUyOlMadaVeJZQyxx9XyDL6vZYbpsz+ok DFaAxFvDHjdUGQFkuMRdJ912Qel857/28ovSSa+bCZYUOHsU0/A3ulX5LJVLYlFLAK zhCSSl4LkMXQCJzEdgey/J0OsKWejSwbv4ZDbSH5vlcmt47nRCYG4hqLgL05dJRbYj m86NiUAlpnyJw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5392B6A049 for ; Sat, 14 Mar 2026 17:17:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530264; bh=bW1ocCo6oGuK5ndaQAQYJxuF6xsCQTFT8TghKZGV4gc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AetmQbe3owpXkKRNy+8z23iw6vMqFF6NdHC2nnVPcVABNK4v6H+FTJukyGoSop2BN 8XU0r0PtFZCfuPW0kQNJTP7rT9yDR70q4bd1l/bcMVkGYoVg8bAMS5vo+0Auo6bJMi p7ukidGAaUqLqG7MAVdTWxUPnnHR8fbwzwmNF3X6fmtp5DBR9DnDYRZlfXIZ6+vbAr 9ZVS1X1uNVlg8pLHN8sjOAsOFQo2ZkMdfDtgRxmKdM/LvEsb5x4rwOTpLiN6QuZ7RN YC2BuNpeTYMwbM7wYEGta/sXcW9lMX41H0RYvQ6IMNM+U9Fc/r9wQay4H/nb99uzNY mbE35LUJ1HclA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2C0BA6A03A; Sat, 14 Mar 2026 17:17:44 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id KhzEnBoWZ41Q; Sat, 14 Mar 2026 17:17:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530262; bh=Z+j3VKiHJ0gSqp/ypNXr2lzedLwgI/9Paah2iXNoQ4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TLi5ZpPkwMdvxcEnGpitwPXerInyJxl01W4KnYmWQoYHbZk0LRB4jap66xbJV36Es 6NzAXkboAVVjhBDi3EFTimCKu+kXYPbnqNOMyGxrwJ7ZxJR+NHs6HjjYpSEvaGIxQk t9rUZxrbKgknkSYYgHC0Oe88xstrTRdUmFl51I3ZRCUxj2FxtJx0mzGpFXSt5lCWdj TPZzH+fpo4/4lrNj2Q21VvfWXQJBoIH6TMdF7WY9JyQA4vUgwZgBr4Zzz5ouEB2A4q 7aGhdD71geIZlQSChAkKK/GzPPKOijZdiKcmLefvKmj9qf5ZEPX1tPnCcf12Nl4fF+ vXAjYlfi+qd8A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3A8B76A036; Sat, 14 Mar 2026 17:17:42 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Sat, 14 Mar 2026 17:16:04 -0600 Message-ID: <20260314231618.338113-14-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260314231618.338113-1-sjg@u-boot.org> References: <20260314231618.338113-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7UY67VML7465I3SGT3ZY4KJYIBUFINJ6 X-Message-ID-Hash: 7UY67VML7465I3SGT3ZY4KJYIBUFINJ6 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 13/19] test: boot: Reset EFI log at start of bootflow_efi List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The 'host load' command calls efi_set_bootdev() which allocates EFI device-path pool memory and logs a free_pool(NULL) entry in the EFI log. If test_source (or another test using 'host load') runs first in the same session, these stale log entries cause bootflow_efi() to fail with EFI_INVALID_PARAMETER when it validates the log. Reset the EFI log at the start of bootflow_efi() so it only checks entries from its own operations. Also move the bloblist_find() call to just before the log-checking loop, since the log may not exist at function entry but may be created during the EFI boot sequence. Signed-off-by: Simon Glass --- test/boot/bootflow.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index e1e50319740..9aab3ea807a 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -1393,8 +1393,8 @@ BOOTSTD_TEST(bootflow_android_image_v2, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT); /* Test EFI bootmeth */ static int bootflow_efi(struct unit_test_state *uts) { - struct efil_hdr *hdr = bloblist_find(BLOBLISTT_EFI_LOG, 0); static const char *order[] = {"mmc1", "usb", NULL}; + struct efil_hdr *hdr; struct efil_rec_hdr *rec_hdr; struct bootstd_priv *std; struct udevice *bootstd; @@ -1402,6 +1402,10 @@ static int bootflow_efi(struct unit_test_state *uts) struct udevice *usb; int i; + /* clear stale entries left by previous tests */ + if (IS_ENABLED(CONFIG_EFI_LOG)) + efi_log_reset(); + ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, &bootstd)); std = dev_get_priv(bootstd); old_order = std->bootdev_order; @@ -1470,6 +1474,7 @@ static int bootflow_efi(struct unit_test_state *uts) ut_assert(!device_active(usb)); /* check memory allocations are as expected */ + hdr = bloblist_find(BLOBLISTT_EFI_LOG, 0); if (!hdr) return 0;