From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22888C433EF for ; Wed, 16 Feb 2022 15:32:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4E35D83A29; Wed, 16 Feb 2022 16:32:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="KkPZGUWL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8EFB783A35; Wed, 16 Feb 2022 16:32:50 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 589D3838AB for ; Wed, 16 Feb 2022 16:32:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645025562; bh=cqhGBO1tX4ft2pMj0gEVl1bLt7E5lksLKCZBX6hex2U=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=KkPZGUWLYqnwrJjOHrRgCZeAzPqyzI9hVaW5v4iynsz35okZasVU2RrOaCpc5hjqO eIhcZMUFEiKy7rVPiv6ZZikKJVPXSh8Qduyt72HUz99K4PpLils5ZLy8NwrNec3Qbm 4Nv2XOtPfXuLukWMadOzUUJI0VzUMX2hBV3OSuzo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.55] ([88.152.144.107]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mnpru-1o5Fpr3mTC-00pKcq; Wed, 16 Feb 2022 16:32:41 +0100 Message-ID: Date: Wed, 16 Feb 2022 16:32:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] test/py: efi_capsule: Handle expected reset after capsule on disk Content-Language: en-US To: Simon Glass Cc: U-Boot Mailing List , Patrick Delaunay , Patrice Chotard , Alexander Graf , AKASHI Takahiro , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu , Masami Hiramatsu References: <41b3551c-5223-a924-99a3-cd245baac51c@gmx.de> <164491595065.536855.9457820061065514578.stgit@localhost> From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:8PbD4vPyk0ZbOhE73FHqsTdFEDv78LWiPHKgkWpghJBhiCwEw1J jgojKCmxy1XPneA1StYPks1dE0sY+qAWVWbbZGRRSAnjjdtB1v9Z7cVlHeCy3pcTPsoa7X9 dok/qw6w3WbWW08XD4weBtxei45fULs6qciQ/FZmhWye1lph2J0Esb6Guyr+36n0uKRLQZO 3FnWsYT5nt8FfqIzn4IMA== X-UI-Out-Filterresults: notjunk:1;V03:K0:iFvuS37HyOU=:/WEcjnHNYKUwvWSfeMGuLG MIzmR5v04EzMIeSiCA578v6VtW+9XmCcdYMRXFUzueT2+K/sPDlHMUTOiNcOHyEArw5VswvXP d9V5dJYX/y9/RPJz+ZpiRz2QGAHVpT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List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 2/16/22 16:26, Simon Glass wrote: > Hi Masami, > > On Tue, 15 Feb 2022 at 02:05, Masami Hiramatsu > wrote: >> >> Since now the capsule_on_disk will restart the u-boot sandbox right >> after the capsule update, if CONFIG_EFI_CAPSULE_ON_DISK_EARLY=3Dy, the >> boot with a new capsule file will repeat reboot sequence. On the >> other hand, if CONFIG_EFI_CAPSULE_ON_DISK_EARLY=3Dn, the 'env print -e' >> command will execute the capsule update on disk and reboot. >> >> Thus this update the uboot_console for those 2 cases; >> >> - restart_uboot(): Add expect_earlyreset optional parameter so that >> it can handle the reboot while booting. >> - run_command(): Add wait_for_reboot optional parameter so that it >> can handle the reboot after executing a command. >> >> And enable those options in the test_capsule_firmware.py test cases. >> >> Signed-off-by: Masami Hiramatsu >> --- >> .../test_efi_capsule/test_capsule_firmware.py | 39 ++++++-- >> test/py/u_boot_console_base.py | 95 +++++++++++= ++++----- >> test/py/u_boot_console_sandbox.py | 6 + >> 3 files changed, 102 insertions(+), 38 deletions(-) > > We have a means to avoid actually doing the reset, see the reset driver. The UEFI specification requires a cold reset after a capsule is updated and before the console is reached. How could the reset driver help to fix the Python tests? Best regards Heinrich > > PLEASE use that instead of adding all this code. Also make sure that > test works with 'make qcheck' too. > > Regards, > Simon