From patchwork Sat Mar 14 23:16:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1982 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=1773530267; bh=xmJWCvxMZ04wHUx8p5WLoB91rQ95qmwOwzODIPIwfpQ=; 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=CwFmvYBSoOECsDh4UfLmFQbAU7xWC08MmEd5DyQCQ9rn1on+YCDkJB+MQA+ovUZDE 4KwTHgKjYyLt8sczrVA2vVklvv1geqEV92eBPc13Jo7Tb0QdYPTzxy+XsKSdzAwDlc DyItaZnliamm6ZaWbWWM3+XH+PR447ek5G98K1CCLleLZ9WUrSvGRxKUsA2R/RvkBa wfL42QMtygtIVn6sx2UmXhuraX4a/qhU7XCUnWzStTafwM2eBcdX3AneBgTurbuFVZ OGzf/d1NZfyYVGb0dUETQzDFLYWWSJfiLBZXvXONGjO6PC12vcA3742x62+OLnwCFy nBOU17EFqbF2g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0D5DA6A03F for ; Sat, 14 Mar 2026 17:17:47 -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 5cOtkLaIDkNk for ; Sat, 14 Mar 2026 17:17:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530265; bh=xmJWCvxMZ04wHUx8p5WLoB91rQ95qmwOwzODIPIwfpQ=; 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=PAAdJae1cZDwPVZG5igRFSwTpLatudChpTPVSaN43uVh8Sp8kMTe/weDoBsWi0iZl jU//ldBRD2H6cPC4X1kdqKufamA0ze/sW9xBgtxcckB0K5FP45ygDXrQtZFW7pIyQP Ay+YWA4LlfBeFWDN1Pwpw0OSRdfrnms5csIle4eUfLCsotjYi+KKOTIkWlNquPk7eF oorJjYtmGOTxDA8UH5G/8EtfgR3CSDbKwCJHGj5VOAv4uy9jK906DIfcV8ZNm/ZrwB Pb9B9XlKizxuE+CgseCF6m2xaKwfRbqhFq7lfFXxigZ8YrthD1SsamzfrtT1bUyLog 0MnYy9YSqS75Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 061336A033 for ; Sat, 14 Mar 2026 17:17:45 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530261; bh=tf0xnAmRveIFlqu+qYbPJEOK7qHTXXnl7lnvzelkFrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L3pQTR5cf/emhXisf9ofMAjc5hI1NTGzchxvkdiA3soiyuHPURBF8P+uOaNd3vX1u izxlD0o0Zsnqlm7Pqg9JANjJY1T2twtwpIHc/o0iCFtyezyrdO+Xn3xrKYfoXK1QPR X4Fv8CyMJsWrU8oh3fIrA3KHqAB4SugydnJ55gq99APWutd+EVfCIZ/3gNH4uBoRcw hs7BAJ2FyIGacqXVvbVYzX14flNYOg3DnTX376AGYkLvZOz73xWwDU+4IE8JF7fKZU TNBqXaVZMUraB5PiNOekFUwRbXXI2fdpET0yZy6HIWejW1De7znMCQ0rdy4JXpSEm3 RlbwrJLV6A8dQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CC7B16A037; Sat, 14 Mar 2026 17:17:41 -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 BmzLAQwgTQYY; Sat, 14 Mar 2026 17:17:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530259; bh=ner+JehcoQCDke/tHS0w+5bR/Xf+3FS/YSiA0xPQFpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f+p8TlUOdnoUApaOuLm4J1K0Pr4xJnyMK1tOMI5WVOE+NKlHX8NFMwkStUw5Npl2x v+MnLZpmPmZ6fMT/pI/CHt2DXkR4YPoKCI4TI4aXJtnnWefWN578jnX+md5+obKpPX uJ7PCSbDxKR3hWVdoQfnzflpOp/h0XjhjD7cSlt7i1bXXbM4qjkuEjALFP7Utp7+XQ 2acOymj7kzQ6D8tVaJk1eTY2JAlUXcKcyqBcR6uvDiWJwtHmNQD5IG0NRwbi8IRspP 7jOoWj5kAn4iN8bvTaQ/vX2eNcOodRAhekmBsItPw6thwNXoxX2TpULouPjcPn6VEu WL7MELQZd7+EA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C5E7F6A03F; Sat, 14 Mar 2026 17:17:38 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Sat, 14 Mar 2026 17:16:00 -0600 Message-ID: <20260314231618.338113-10-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: NC4FRJPV5OZY4N6EZUIW3G5PWXPCCEZG X-Message-ID-Hash: NC4FRJPV5OZY4N6EZUIW3G5PWXPCCEZG 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 09/19] test: pxe: Fix ipappend test to clear board env var 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 pxe_test_ipappend_norun() clears fdtfile to test the fdtdir fallback path, but the fallback code in pxe_utils.c constructs the DTB filename from the board env var (which is 'sandbox'). This causes the test to try /dtb/sandbox.dtb instead of /dtb/.dtb Clear the board env var alongside fdtfile, and restore it in the cleanup section. Signed-off-by: Simon Glass --- test/boot/pxe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/boot/pxe.c b/test/boot/pxe.c index e691ceebc61..237481d5ee8 100644 --- a/test/boot/pxe.c +++ b/test/boot/pxe.c @@ -958,8 +958,12 @@ static int pxe_test_ipappend_norun(struct unit_test_state *uts) ut_assertok(env_set("gatewayip", "192.168.1.254")); ut_assertok(env_set("netmask", "255.255.255.0")); - /* Clear fdtfile to ensure rescue label's fdtdir tries /dtb/.dtb */ + /* + * Clear fdtfile and board so the rescue label's fdtdir tries + * /dtb/.dtb (the fallback constructs soc-board.dtb from env) + */ ut_assertok(env_set("fdtfile", NULL)); + ut_assertok(env_set("board", NULL)); /* Override to boot the rescue label which has ipappend=3 */ ut_assertok(env_set("pxe_label_override", "rescue")); @@ -996,6 +1000,7 @@ static int pxe_test_ipappend_norun(struct unit_test_state *uts) ut_assert_console_end(); /* Clean up */ + env_set("board", "sandbox"); env_set("ipaddr", NULL); env_set("serverip", NULL); env_set("gatewayip", NULL);