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 7408CC433F5 for ; Wed, 16 Feb 2022 15:46:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2FCA83A13; Wed, 16 Feb 2022 16:46:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com 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; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="rSCPE66N"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 06D4A83A29; Wed, 16 Feb 2022 16:46:50 +0100 (CET) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 871D9838AB for ; Wed, 16 Feb 2022 16:46:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2c.google.com with SMTP id p7so2605171qvk.11 for ; Wed, 16 Feb 2022 07:46:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tB609rPsqwXiPzs9dxERlZYNwCwKY7J61Z3lhb+8zew=; b=rSCPE66Nob9GauaWJy30YGr0GJeIGj0PeEZzJbRD7HNgJJxDRsNXxP/JF2zIEUU3QN rO7IWE2HUAe4UHnu3lhLggFtUojB/06/MwvZYh4/6y/SENuKMsZoobiieWC5H1GwYsGo zj5k4UDNEsdaTQu1oM52e6rMXg93bPqr0ZIso= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tB609rPsqwXiPzs9dxERlZYNwCwKY7J61Z3lhb+8zew=; b=CTq2R5xbG60PNAyJeNOZ7RVkfSkN7h2QA6RsJG9sUzHrDw65tCNpT+MH1usOyAbSSY c175vM4BUrFBWzeOL9oKYCPKzsU7SRxe54DxoWRh/kejP8JUNAN9cBFlIhn7BlXrJT2H Tr95QXhkP4J/ukg45oEacDyLDrYJIfDOFBKWtnbexmQGJPjac1d/uyNKjUAl704pFLpB WVQ8qhD3dECAIoUMGAdgo0H/HjdISEBgaTk4d1U3fjhMG+JFnVoysmGRXTQhSnDwB7/A /X3y44Z4DLZkXG0RoiANquQYluACL/WwJxsVGrH3nyjFGrLWAcXpUZsCw0fdAhS2xDVZ MTiw== X-Gm-Message-State: AOAM531TN+t2B/FsJMwBI3swU8oG/4+H6V1lz+12trEs8N/lyxbeRb0E ik6PkPHqyNC70/KHVmBX2OV7MQ== X-Google-Smtp-Source: ABdhPJy2fELzsfIG+ntAbkm7FHEihIAdtnTVQFvuGEdlVuoMK56X7L78tvKyjph6CR+qL9ZmEu+pVg== X-Received: by 2002:a05:622a:1113:b0:2d8:e203:25e with SMTP id e19-20020a05622a111300b002d8e203025emr2374079qty.29.1645026405159; Wed, 16 Feb 2022 07:46:45 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id j19sm16484497qkp.120.2022.02.16.07.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 07:46:44 -0800 (PST) Date: Wed, 16 Feb 2022 10:46:42 -0500 From: Tom Rini To: Heinrich Schuchardt Cc: Simon Glass , U-Boot Mailing List , Patrick Delaunay , Patrice Chotard , Alexander Graf , AKASHI Takahiro , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Etienne Carriere , Sughosh Ganu , Paul Liu , Masami Hiramatsu Subject: Re: [PATCH] test/py: efi_capsule: Handle expected reset after capsule on disk Message-ID: <20220216154642.GA1576803@bill-the-cat> References: <41b3551c-5223-a924-99a3-cd245baac51c@gmx.de> <164491595065.536855.9457820061065514578.stgit@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion 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 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 16, 2022 at 04:32:40PM +0100, Heinrich Schuchardt wrote: > On 2/16/22 16:26, Simon Glass wrote: > > Hi Masami, > >=20 > > On Tue, 15 Feb 2022 at 02:05, Masami Hiramatsu > > wrote: > > >=20 > > > 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. > > >=20 > > > Thus this update the uboot_console for those 2 cases; > > >=20 > > > - 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. > > >=20 > > > And enable those options in the test_capsule_firmware.py test cases. > > >=20 > > > 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(-) > >=20 > > We have a means to avoid actually doing the reset, see the reset driver. >=20 > 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? Is this test going to be able to run on qemu, sandbox, real hardware, or all 3? The tests may well end up having to know a bit more, sadly, about the type of system they're testing. --=20 Tom --SUOF0GtieIMvvwua Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmINHF4ACgkQFHw5/5Y0 tyw6egv5AQslLa91sOc+jIqPWK/fa2wU4sbnQZidfqqCi3ezXqOqnvMJHpyTOcNO 9EIje9/ojRu/sQBODmF3/B1Z98WPRJxgmXV3XSseDj979+dho8LkRMsAo/1YRJI9 k4msb0/6TgOujzUCVRgA7ZWHV30Mn60YIUJtOCbLF6LnZUfWU5yGwGvsXMSbUYsW 862cNoJV30tmv5dRttEiRy+fcFDvg4Sa3g5YImNQbnhUf9/5mnfP5wuMYmL1/4+k 7algCRoVCjnfcM2kizO+bMZQePl0Ojp03oYqk1EacjFB7DQz4OssOQQnKp5NeoGk I8p4stoTA+H0BtmcqZLq02z6Bgg0A7tR6184AkGSI7VUyjtYeNmCqpgJ1lv/T5DE MydJ9nlICd5YdX3MAyp8EI5bUz/99w640vkaoMgT5iany+IQ0zcd3XYWpwpls8se 18SOeL2b6YyROFOCek3eZ1QIi/TcC6rWP9WXRClEmEQqgH4I00mNObWnuTO3iJEH Z82JgkcS =R+6D -----END PGP SIGNATURE----- --SUOF0GtieIMvvwua--