From patchwork Fri Jan 9 01:53: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: 1365 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=1767923637; bh=NggVMik/hybm+ZZzvK5o4582kBD9rL2lCCbqLXUDkdI=; 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=ivCE+G+PyLLBr0cu6fCiLq8s0xuwmi0m34k97F7PSqL0yvzAEJIsVnpqAfGhqtQFT 3R2VEl0ri362kaYE5ml29DMN2WNhLrqWUPpezvKFCtByLvzsvXbrzWjPX8Gqa5NXqw jv+tvOgkrGhDQBcP9EhDHSdxRAS/mSVoJIw+OfAW/+he0QyWNaiA+jv6jrPdmX7pYd 3Hq1iHJ16B/BOJvtyBO6hNk0D3x9ZtmlfQW5R/1Hva0kpAsTxZPJfZprJ+P0195+QW iQyRdyisdbnxnl19jvD7ZjeL87Gvm8lNuqvG3MKc2ndzWfzgHFgtzgOaFG1lrYUjvo HUYbHfP6Sulhg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0ADF769130 for ; Thu, 8 Jan 2026 18:53:57 -0700 (MST) 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 4nP3Lc1U6hBJ for ; Thu, 8 Jan 2026 18:53:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767923636; bh=NggVMik/hybm+ZZzvK5o4582kBD9rL2lCCbqLXUDkdI=; 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=dUFjpT5OwurAU+198lDzvPwr9N9iNiA8lcthfdWcRjZIWlRO+UErtpxXwSidlb2bo d1W9kCQH5+IswGJV9Y4ZcZzp5zoSYt7baUx92xGzHYMS0Qpr0NG5UPT4Zz/HiT+Fe/ eFI1Qp7m5xLT1zKBAZW52kzxPlqCGACJ4oo8lkgBtocFsnzQk/Hvb+CG+p+uZS7UbS lib+pYNDcszC3IFTbcv87Ju9bYniTTu+Y5Pt1MWinJ9XKYRQ2YrsHg5CBSwWFMaEyO ZCd3c1u1xaIysSONyYPKKy87Nnr13HZDMNiCyYBjZONzGuXsF2Cnj7VnpFW7bKv3br 9z1EMau1El0dw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ED54A691E6 for ; Thu, 8 Jan 2026 18:53:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767923634; bh=6dQo+S6XrNGFbv9wxvGJc/WHhZKA+4/GYd2inDLo+Q8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RzoJgdvkf/IqXORo1Og2ot45KK3LIB42QV7NI9foxxNc/egOvjE7rprKob2tdXbuh 4Y0qyxEQK7tpNc65rinliVzB+Opi1XdHdb6liibKLwADwtRGmROdPeXarfDCpgiOFO pMzWUcx8P45Jx8Aol8HJ/K8+bASCK+HW7P2O5pvVZ7fSwPWP/PXq1kVw5z5zbZgRYb +iBUGARazjruauKO6O1ZBIjWMST/MkmuAfuWJnBeX79u+Rkj7493UmOODeQnP3/Jw5 k1mXQHpNh6GncbTmtwB9mYk3suh9awty5dpq/iBwX1Irkj3HILTQsrlEtKZLDdH2nv /z7yiTbhJYhaw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9F78969130; Thu, 8 Jan 2026 18:53:54 -0700 (MST) 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 4g6uQUgRDWBO; Thu, 8 Jan 2026 18:53:54 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767923630; bh=2RaKpeGSBgX7Ud2LWqGKAdcupLyHG1k3XA6x/a4iQD4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b/GRLoQaK8UooVUP2kvq/ZHkJH58t38YeCkXCA7umYTPU3bMO276dx+yFhoLayAYF 0jRAtgX+LrgKBQXpTKX4xveXFO8W4rPerb/pTp9TWGMG5N/dw8FO59ydK60PRQKVjF Nd2lJ92AikRob2ty0xc63a9ZLjbNh1VLJgbqAixOg+Eccix2Qfo0dTBw1euM3Hz5W8 tXuiF4qDsWElwgDTSR4wJjUapgeMNKu/cwfrNy/3SDnkhML2ZmZcTIwkTbmUSQec4d N3qrzpaN2ZaMXYZ1NclkQ5NxBA41LkqDaMWfipXSzQHIuNwCTbxAYI4xrP544TxvwS chqua3k0rBjHA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 55C346912D; Thu, 8 Jan 2026 18:53:50 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 8 Jan 2026 18:53:04 -0700 Message-ID: <20260109015323.3411528-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260109015323.3411528-1-sjg@u-boot.org> References: <20260109015323.3411528-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TCOVSQ7GKI6WQTKF2WVAO5MZMAKEGAXO X-Message-ID-Hash: TCOVSQ7GKI6WQTKF2WVAO5MZMAKEGAXO 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/16] test: pxe: Add a test for the 'say' keyword 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 Add test coverage for the 'say' keyword which prints a message during label-parsing. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- test/boot/pxe.c | 7 +++++++ test/py/tests/test_pxe_parser.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/test/boot/pxe.c b/test/boot/pxe.c index 49d8d160389..ef42026e748 100644 --- a/test/boot/pxe.c +++ b/test/boot/pxe.c @@ -101,6 +101,10 @@ static int pxe_test_parse_norun(struct unit_test_state *uts) cfg = parse_pxefile(&ctx, addr); ut_assertnonnull(cfg); + /* Verify 'say' keyword printed its message during parsing */ + ut_assert_nextline("Retrieving file: %s", cfg_path); + ut_assert_nextline("Booting default Linux kernel"); + /* Verify menu properties */ ut_asserteq_str("Test Boot Menu", cfg->title); ut_asserteq_str("linux", cfg->default_label); @@ -186,6 +190,9 @@ static int pxe_test_parse_norun(struct unit_test_state *uts) ut_asserteq(0, label->localboot_val); ut_asserteq(0, label->kaslrseed); + /* Verify no more console output */ + ut_assert_console_end(); + /* Clean up */ destroy_pxe_menu(cfg); pxe_destroy_ctx(&ctx); diff --git a/test/py/tests/test_pxe_parser.py b/test/py/tests/test_pxe_parser.py index c9af135b17d..1d51116a97a 100644 --- a/test/py/tests/test_pxe_parser.py +++ b/test/py/tests/test_pxe_parser.py @@ -105,6 +105,8 @@ def create_extlinux_conf(srcdir, labels, menu_opts=None): fd.write(f" fit {label['fit']}\n") if label.get('kaslrseed'): fd.write(" kaslrseed\n") + if 'say' in label: + fd.write(f" say {label['say']}\n") return '/extlinux/extlinux.conf' @@ -126,6 +128,7 @@ def pxe_image(u_boot_config): 'fdt': '/dtb/board.dtb', 'fdtoverlays': '/dtb/overlay1.dtbo /dtb/overlay2.dtbo', 'kaslrseed': True, + 'say': 'Booting default Linux kernel', 'default': True, }, {