From patchwork Tue Sep 23 19:38:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 412 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=1758656337; bh=CXq6PvxixcXnvZde3ENcpwvv0XoUFo2bKGabDIMilrk=; 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=IV+9qbxa5RmNKjegkwdhU+QbXLAUZQ6Ezglq7fwVhIx8PWJ8dD7X6fZLfboEd6jou fDDdDOhTjEPxbQ/WRYBkllnWfYWnfVbKw3KMI+IbJJuAE70U4hPhZWL/jfCZypxgpi Ekb9PwRyWpwF9BVGnoA2kvbO7JJ4aqmif8KX0imrOVB2M1o1ar63lLsFxOg6qNZoP/ ZRITt+dchu9sAd7I8CL2mB/96RVGurKa+R/8xrxAYjKXA2NquamQPKRgqiHlUntN+n Z3Ry0ReGZp6ObHhI6Z8FeNUxL/3/AOh3YxHPfgzLLMLHUpYwXh8jwxU9JZuZazILqd X85q6t5MwyCww== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CC7FD67D2F for ; Tue, 23 Sep 2025 13:38:57 -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 3ed_LEygqmPb for ; Tue, 23 Sep 2025 13:38:57 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758656337; bh=CXq6PvxixcXnvZde3ENcpwvv0XoUFo2bKGabDIMilrk=; 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=IV+9qbxa5RmNKjegkwdhU+QbXLAUZQ6Ezglq7fwVhIx8PWJ8dD7X6fZLfboEd6jou fDDdDOhTjEPxbQ/WRYBkllnWfYWnfVbKw3KMI+IbJJuAE70U4hPhZWL/jfCZypxgpi Ekb9PwRyWpwF9BVGnoA2kvbO7JJ4aqmif8KX0imrOVB2M1o1ar63lLsFxOg6qNZoP/ ZRITt+dchu9sAd7I8CL2mB/96RVGurKa+R/8xrxAYjKXA2NquamQPKRgqiHlUntN+n Z3Ry0ReGZp6ObHhI6Z8FeNUxL/3/AOh3YxHPfgzLLMLHUpYwXh8jwxU9JZuZazILqd X85q6t5MwyCww== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BCCDA67D29 for ; Tue, 23 Sep 2025 13:38:57 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758656335; bh=hz+pGaS+nWNMyE2WMt5dA/MpkQLoYJm9zezDMlBcaEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QtBX9zzmLcGd209vAharF9gL3s9dMvNTDNB+7Nu4j2Pe/GKU5kQZ/bE5MUeOSU8r7 HKAtN7lPr7tMYiJI/kZs6d5JYkBKzSD6rUWXYkm4uZilSXr9I7P0WfkghG2nS8k9Lz 8vIQe8kKsE2MUl4QVwUCtFmnAP/VMbKUFnevNKKxNGWZuPQc6zEKXON+W6Crc5+e4r hrHt1yywH4E5AJJZz6dOC9m/x8C8dwBzuOfb6ZSfEPiUZoWl+ATLmrmCMpfH7d6MBw 0GSod9J55Arl7PuFZfk1uSS3oBDu4tX43YtpkJiiMgtLWksgEsGVg+gXzfDzCatHWO wwRlTKYV57/8Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8FAC867A42; Tue, 23 Sep 2025 13:38:55 -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 NFGfjwfegwsz; Tue, 23 Sep 2025 13:38:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758656329; bh=r6nxEntv8fSJIbGjJmb6hYSJsYtGn2ZUx6s66f4hMfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNQaJNSw19KPZ+PIOxJx/nO0jx+d29LgtmSTu0wCi/zlCo8yCI2hKF/IUEGZst7eO SpZuI4c2ZbRxHOlhTkHgez/8p9QLatPwr94Asn+WVNkKKTUfn8MB2vQiEln4k9l2EC 4TxBG6P2RYt5iRSXyP6s91XDjoHtmqSIWdDUpQYzoLux7e0q8xnVEGcetMkK3jw0D6 EK5KW4kBCuU72pULRHGUnoWuoFNxXzi6TeVJK5KSebXNEvXed1yK6rLhzsZnGhaZIo 6XTcuhC5WYg3GAkF8N97RwOdXRhZ25T2cv7VxjpxUNDAZHDRt0zVZnVbrXedf710kr lZOjb5qb9AYkw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9E59C67CD3; Tue, 23 Sep 2025 13:38:49 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 23 Sep 2025 13:38:30 -0600 Message-ID: <20250923193833.1506358-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250923193833.1506358-1-sjg@u-boot.org> References: <20250923193833.1506358-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 2P4MHY42RDUJ3YQK74KAWACWUJDT5PYW X-Message-ID-Hash: 2P4MHY42RDUJ3YQK74KAWACWUJDT5PYW 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/4] test: Deal with the silent menu in grub 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 distro test for EFI in the EFI ARM app is currently flaky. If the test does not send an 'escape' character, then the board may boot straight into Ubuntu. If it does, but didn't need to, then grub sits at the command prompt. Handle this by pressing escape twice (which should always go to the grub command line), then using the 'normal' command to start the menu. Signed-off-by: Simon Glass --- test/py/tests/test_distro.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/py/tests/test_distro.py b/test/py/tests/test_distro.py index cc4aa265d90..d9bc9b18648 100644 --- a/test/py/tests/test_distro.py +++ b/test/py/tests/test_distro.py @@ -106,13 +106,21 @@ def test_distro_arm_app_efi(ubman): ["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 + # 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(['ESC to return previous']) - # ubman.expect(['The highlighted entry will be executed automatically in 29s']) + ubman.expect(['grub>']) + + ubman.run_command('normal', wait_for_prompt=False) + + # exp = ubman.expect(['ESC to return previous', 'grub>']) + ubman.expect(['The highlighted entry will be executed automatically in']) # Press 'e' to edit the command line ubman.log.info("Pressing 'e'")