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 E258AC433EF for ; Fri, 18 Feb 2022 14:11:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5B83383BA4; Fri, 18 Feb 2022 15:11:23 +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="mYjDgLlM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E3A2B83A92; Fri, 18 Feb 2022 15:11:20 +0100 (CET) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (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 5945F83BBF for ; Fri, 18 Feb 2022 15:11:16 +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-xf34.google.com with SMTP id p7so14900024qvk.11 for ; Fri, 18 Feb 2022 06:11:16 -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=zhh54STTdPzLwBzy8KSivF1BK0AjzTG6duzS3kzEqOQ=; b=mYjDgLlMvue07cbLjyX1idNAgYKC9xQJeWbkC78cqS7zpyNJ9OtyIhtViLweEDsGz3 LL35C3vRuWhQ/h7QzuPa0mRuI4ACroenKcgF/rLvyfRZKu7oiLDxA05DaaUcxSBANSME 7qXIcDr0aXFTLAqPlNRXg48HGVNmg2jYOAZdQ= 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=zhh54STTdPzLwBzy8KSivF1BK0AjzTG6duzS3kzEqOQ=; b=mKAavVMJTzjBoEgk37J2RNnz8loK4n6hP/MWe3SMSIBRI0U+dPa75vowAvGqec7aV4 CSp0/TzEUO+vSyJmgAviXs04j1tGQP9rdOVHXy8+mbz2KnPKiEl9ryerHq6lFG8GwqVP zyuytrHNY1PiYC5hJQJxtyvibLtlPce4AX6AmTuA9K+szhxLtDhYboZ1HZfd3U+DSBr9 kHfrngLrddwAtg9hlUZ/8tfd5Gc8wwkke0cuKCLcE80P2tG8YvWL4pWlMVymsJrYHspU HE4aWtjHQ5L/WJIsJHaDhjbtD+UxAfKQjLvNkFMgBKcGD8ffwjBaEso9h00mHIGgQRl1 fNsw== X-Gm-Message-State: AOAM533X0aBGPpr7hR2vA/qmSYzVkAZnNLpJ4yUirGOAtxSxY2WikFtG iF/FLF1swJRKqkk3MHPg4HEsMA== X-Google-Smtp-Source: ABdhPJyIiUmgh6W9fD28CfVFZOoXeaDavgNihw7xVwEpX80j8KfO8q4typbP06OabX+pww2K9oo8Vg== X-Received: by 2002:a05:622a:110:b0:2dd:461a:6126 with SMTP id u16-20020a05622a011000b002dd461a6126mr6379875qtw.379.1645193474548; Fri, 18 Feb 2022 06:11:14 -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 d6sm25222521qtb.55.2022.02.18.06.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 06:11:13 -0800 (PST) Date: Fri, 18 Feb 2022 09:11:10 -0500 From: Tom Rini To: Heinrich Schuchardt Cc: Masami Hiramatsu , 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 , Simon Glass Subject: Re: [PATCH] test/py: efi_capsule: Handle expected reset after capsule on disk Message-ID: <20220218141110.GZ1576803@bill-the-cat> References: <41b3551c-5223-a924-99a3-cd245baac51c@gmx.de> <164491595065.536855.9457820061065514578.stgit@localhost> <20220216154642.GA1576803@bill-the-cat> <4ba143f8-6114-db0e-08e2-d97ac9dc6e13@gmx.de> <0760e250-20ab-c760-3271-c15f43bc53f2@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xmHgJexE5s//CZci" Content-Disposition: inline In-Reply-To: <0760e250-20ab-c760-3271-c15f43bc53f2@gmx.de> 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 --xmHgJexE5s//CZci Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 18, 2022 at 02:59:05PM +0100, Heinrich Schuchardt wrote: > On 2/17/22 18:55, Simon Glass wrote: > > Hi Masami, > >=20 > > On Wed, 16 Feb 2022 at 18:11, Masami Hiramatsu > > wrote: > > >=20 > > > Hi Simon, > > >=20 > > > Let me confirm your point. > > > So are you concerning the 'real' reset for the capsule update test > > > case itself or this patch? > > >=20 > > > I'm actually learning how the test is working, so please help me to > > > understand how I can solve it. > > >=20 > > > There are 3 environments to run the test, sandbox, Qemu, and a real b= oard. > > > If we reset a sandbox, it will continue to run (just restart itself), > >=20 > > Here you should be able to avoid doing a reset. See > > dm_test_sysreset_base() which tests sysreset drivers on sandbox. > >=20 > > > but Qemu and real board will cause a real reset and it will terminate > > > the qemu or stop the board (depends on how it is implemented). Thus, > > > if a command or boot process will cause a reset, it will need a > > > special care (maybe respawn?). > >=20 > > Here you need to worry about the surrounding automation logic which > > could be tbot of the U-Boot pytest hooks. I suggest you avoid this and > > handle it some other way, without reset. > >=20 > > >=20 > > > Since the capsule update testcase only runs on sandbox, it will not > > > cause real reset. But maybe it is possible to support running on Qemu. > >=20 > > Maybe, but I don't think you should worry about that, at least for > > now. The sandbox test is enough. > >=20 > > >=20 > > > Current my test patch (and capsule update testcase itself) doesn't > > > handle the real reset case correctly even on Qemu. The Qemu needs > > > spawn a new instance and re-connect the console when the reset > > > happens. >=20 > Respawning of QEMU instances after a reset is handled by the scripts in > https://source.denx.de/u-boot/u-boot-test-hooks.git on Gitlab CI. For my > local tests I have used: > https://github.com/xypron/u-boot-build/tree/qemu-arm64/u-boot-test >=20 > If you want to set up an environment for a real board, you have to write > your own python scripts and make them available over PYTHONPATH. For an > example see > https://github.com/xypron/u-boot-build/tree/orangepi-pc/u-boot-test To be clear, Simon also has a number of physical boards in a CI lab. Perhaps part of the confusion here is that we're thinking of these tests as something more special than what we have already, but I don't think that's the case. It's just shifting the logic around a little bit in that today we have "build u-boot, flash u-boot, ensure that version is now running" and this is "build u-boot, update u-boot, ensure that version is now running". --=20 Tom --xmHgJexE5s//CZci Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmIPqPcACgkQFHw5/5Y0 tywktgwAtH+FT2cNvGXTF3xF0sI926uCQEywQus6UMbRgkeoYJHBTPUcAizRgops NIbDgSywA++nb7oEVcmlPE1/u1xF2PRuN4LtN2NrPl3MmSk4jBSqsm4yKKRXcwCP TdYopzmNl7FRSmNVeFQ/syITX0gKUpWUSl+Nu88v6K0DwadiKAIk6VJygTWJ0R1k hLsIu+ngrSV7Emed72ooqOchdozFwW9jVZ5dL+kA1H7XO4BSeyXx0ZlZwULC6BHZ Dqr0a0JJ9NJVe5M2JrqLYOEl0pcP3wcya0OBBMWUpOZgpZgZ8P/ZSZjAwAyaXa5K juAIhjWLWFvCPWyIAH0dLzKbYvCfdh+oBdy8seN8ogq8M1wlD3j7GqPy10xy/WGc UXXlpRrmj/0QEURGYz4Ud/YhKj4VgGOVOyEY3MacXLFssto7kST8VuuVuY8KvSII j8ZznY6AsIlF288glRdWOR5aCTyYbMjUONTdzPBpvteuPyC+/4uC7/Ax9pVms43o UNGtGDQc =pfsS -----END PGP SIGNATURE----- --xmHgJexE5s//CZci--