From patchwork Sat Dec 20 05:10:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 994 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=1766207445; bh=vkP18qQWnx919cR/WKy9o/Q/6PciXzDQRaY01ZLoD7E=; 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=uZiT5afCd+9YcPVK1hNPqSbQbdCCwHUbGtgLe3UKoGSuKdvPwFYeVnUQIJAjyiVsY PjGcLR6wSgXpOvRfxtikDhAL0FbauH2fuWslDgskIE/a0DyTU2JPU71C1N5qxofn3B q6+jma8srEzgQCTimIKuUF6MF5iV9sswsezFC9nla8/qoj4k0HredRS8cEhnwID+nw j+v81a7DRwsM/NYdBY0S68/T7A/uX1hHjstMuDfUVovz9NTfP1oLf4NB+3MSQP8I7e 0u9z5MdItpYOtysrfw8FK4Qy1kk+WlxFq8kfQ+aTRXYet8tyE4ZjpiZH/CnlfaKfDB KY6lPKWtEl9YQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 966DE64C38 for ; Fri, 19 Dec 2025 22:10:45 -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 SbOkznXwOAkJ for ; Fri, 19 Dec 2025 22:10:45 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766207445; bh=vkP18qQWnx919cR/WKy9o/Q/6PciXzDQRaY01ZLoD7E=; 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=uZiT5afCd+9YcPVK1hNPqSbQbdCCwHUbGtgLe3UKoGSuKdvPwFYeVnUQIJAjyiVsY PjGcLR6wSgXpOvRfxtikDhAL0FbauH2fuWslDgskIE/a0DyTU2JPU71C1N5qxofn3B q6+jma8srEzgQCTimIKuUF6MF5iV9sswsezFC9nla8/qoj4k0HredRS8cEhnwID+nw j+v81a7DRwsM/NYdBY0S68/T7A/uX1hHjstMuDfUVovz9NTfP1oLf4NB+3MSQP8I7e 0u9z5MdItpYOtysrfw8FK4Qy1kk+WlxFq8kfQ+aTRXYet8tyE4ZjpiZH/CnlfaKfDB KY6lPKWtEl9YQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8619D64C22 for ; Fri, 19 Dec 2025 22:10:45 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766207442; bh=xEtqVFMxjA7J44OZb5QdpdLXGYkIKwwbGH5/1Mtz2II=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ULFYKIiH+cXwbh7r3JYAljsYDfGcpC4Iwe3eCr46GVBeOJ7XD27TEwF2IlrJzVf6g yuBcsAJPDcv0ZQvCV+tQqnJynqLMauBMHPdeGNOzWdUT1djYbj9SsvzD+iiyY618sB YKkvSHnYdbc6pEGAvPGfJB1+o+ZyMHjRoPAgHn3JRr329cdkPTAAqD2kGKxwPDuovn 6RfGhXu+Brjl0WbNxqqnY19w0l/C9vZx21D7xk2glaKJobfpngo8K/vI0gJy22J0Vp c7kOQlZz4jgdlZUL+BgMXFYsTWew30sqtNgV4qIK8tFji84Cwn4LuL2EhVgRGZRNAX dtHbuxhymDRQQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8567964C22; Fri, 19 Dec 2025 22:10:42 -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 QxiTM0NZJrJn; Fri, 19 Dec 2025 22:10:42 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766207437; bh=pqVFG59cczRT5O0wfYT5F/Roe7QABwM1vVJ/b0iKtk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dj8Fh/4lqpTGFptVUQp6mErpcwYq8Piqfh2OqWUXbHmUm5I1rgmBOXpstarehw45w Ywyv8iMBPejrW7ti8VN2Q3py2mVP6BJ/9b8qU7l2rdWMtFO+hYVRdRPhFUhWN/PNT3 AxwvD70x8/E5AaHsdXbfqfjWFZki17a4FKXIgUj6BB8g71m11PIdV2BBcL5yj7+w8d 3TFWOrASO6cRwcCOCK3SZ427gkIDJ+Hvt7BIR6V5QmvSU7Yfc4jwFqgv77cjT13OXF 82o0LnYCTu99wokgtH/+mNuS78NrYBIvXfhS8i392fQsj0Tdwu3S/1Hd3T0iQGoq7w LVFnx+6+pSy8g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id B20B364C0C; Fri, 19 Dec 2025 22:10:36 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 19 Dec 2025 22:10:10 -0700 Message-ID: <20251220051013.3459855-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251220051013.3459855-1-sjg@u-boot.org> References: <20251220051013.3459855-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: LHABCRVY5VVICILMC2VV5DYPWC5KWSSB X-Message-ID-Hash: LHABCRVY5VVICILMC2VV5DYPWC5KWSSB 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/4] test/py: Simplify test_distro_arm_app_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 GRUB menu editing approach is fragile because: 1. GRUB can auto-boot before the test interacts with the menu 2. The command line content varies (e.g. '$vt_handoff' vs 'quiet splash') 3. Character-by-character navigation depends on exact screen layout Simplify to just verify that EFI boot through GRUB reaches Linux userspace, without trying to edit the kernel command line. Co-developed-by: Claude Signed-off-by: Simon Glass --- test/py/tests/test_distro.py | 48 +++--------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/test/py/tests/test_distro.py b/test/py/tests/test_distro.py index 4a44e2a30a4..257af800cdd 100644 --- a/test/py/tests/test_distro.py +++ b/test/py/tests/test_distro.py @@ -105,49 +105,9 @@ def test_distro_arm_app_efi(ubman): ubman.expect( ["Booting bootflow 'efi_media_1.bootdev.part_1' with efi"]) - # Press Escape to force GRUB to appear, even if the silent menu was - # enabled by a previous boot. If the menu is already set to appear, this - # will exit to the grub> prompt - ubman.send('\x1b') - - # Press Escape again, to force it to the grub> prompt - ubman.send('\x1b') - - # Wait until we see the editor appear - with ubman.log.section('grub'): - ubman.expect(['grub>']) - - ubman.run_command('normal', wait_for_prompt=False) - - ubman.expect(['ESC to return previous']) - - # Press 'e' to edit the command line - ubman.log.info("Pressing 'e'") - ubman.send('e') - for _ in range(10): - ubman.ctrl('N') - expected = '\tlinux\t/boot/vmlinuz-6.14.0-27-generic ' - expected += 'root=UUID=e5665fb4-e1de-4335-86da-357ad5422319 ro ' - for _ in expected: - ubman.ctrl('F') - - to_erase = 'quiet splash' - for _ in to_erase: - ubman.ctrl('D') - ubman.ctrl('X') - ubman.expect(['Booting a command list']) - - with ubman.log.section('exit boot-services'): - ubman.expect(['EFI stub: Exiting boot services...']) - - ubman.log.info("boot") - ubman.expect(['Booting Linux on physical CPU']) - - with ubman.log.section('initrd'): - ubman.expect(['Freeing initrd memory:']) - ubman.expect(['Run /init as init process']) - - with ubman.temporary_timeout(200 * 1000): - ubman.expect(['Ubuntu 25.04 qarm ttyAMA0']) + # Wait for Linux to boot to userspace (kernel may be quiet) + with ubman.log.section('Linux'): + with ubman.temporary_timeout(200 * 1000): + ubman.expect(['Ubuntu 25.04 qarm ttyAMA0']) ubman.restart_uboot()