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 405F0C433F5 for ; Fri, 18 Feb 2022 16:50:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E551783B83; Fri, 18 Feb 2022 17:50: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="YaMxXQy/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BFBF883B87; Fri, 18 Feb 2022 17:50:50 +0100 (CET) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (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 3634483B83 for ; Fri, 18 Feb 2022 17:50:47 +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-xf2a.google.com with SMTP id e22so15823503qvf.9 for ; Fri, 18 Feb 2022 08:50:47 -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=lcOyu8S1DJ/aGRAeFQ5oJsK0PnxlEKEqiUu42n+kCYQ=; b=YaMxXQy/UbV98Gg3Ews+o6Sp7EVr+HTRs6hMI6NmJwt8VUdKCru9C3Q5IfcEphIhxA J+9bjiAGLEH46w/pVQ71mm+In3yxt/G3Muqw+SOnYnlwhjj7qVO96VtolZ4rAOVSUY4v 2uT0vUKwWOI5skRb9k2PL9Dv7Pw1drAfg2U7U= 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=lcOyu8S1DJ/aGRAeFQ5oJsK0PnxlEKEqiUu42n+kCYQ=; b=yqyB0klcZhRhvUqRaORch2cHBgju0xSWIkV93e+b2IJ6KkOi9sNH+DOwNEwx6OzbJZ cwlBf1nX+J8iVneejA0ippKNFK3vj9a+AxioO0wX3TyWX7gL/GFWdDplZO02Pc7OMjII /7ZStgJU+LLQZwgr6g2+GUccfougFbh3eFD6Ifu9mXvv3YFhcq3CIuZb/ZF2hapfUsOE c4m1DCwk3cSVPGBT0NYkJGeTj1UZx68hx1qMh6o6u7CDUVScFnljpbhcjJlJmJm7lDNt xrJ0moporYFF4WDf2fvpYs4ThJXSlqKPD7ueBlW6JaFjBo+n/1/XRVnqFmWBRukKmiPf 5Ggg== X-Gm-Message-State: AOAM532Tzd8qWgGvPzPyK+YFYM454KCZG/b/CdusKYHeI2EN84n24kl6 FfFgozSTOqKNaNY9CY/9QbNAGw== X-Google-Smtp-Source: ABdhPJylUITtGbYnqrDZsj05BDsvYDSmcNFcXHAMhbAL0UReNL9zO/ZcU9/GVQQ2+8kurfNtK7sN8Q== X-Received: by 2002:a05:6214:dac:b0:42c:421:e128 with SMTP id h12-20020a0562140dac00b0042c0421e128mr6450556qvh.50.1645203045780; Fri, 18 Feb 2022 08:50: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 d17sm22826813qkn.84.2022.02.18.08.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 08:50:45 -0800 (PST) Date: Fri, 18 Feb 2022 11:50:42 -0500 From: Tom Rini To: Simon Glass Cc: Masami Hiramatsu , Heinrich Schuchardt , 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 Subject: Re: [PATCH] test/py: efi_capsule: Handle expected reset after capsule on disk Message-ID: <20220218165042.GA1576803@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="x0PBmTWHB3bjoOVh" 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 --x0PBmTWHB3bjoOVh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 17, 2022 at 10:55:58AM -0700, Simon Glass wrote: > Hi Masami, >=20 > On Wed, 16 Feb 2022 at 18:11, Masami Hiramatsu > wrote: > > > > Hi Simon, > > > > Let me confirm your point. > > So are you concerning the 'real' reset for the capsule update test > > case itself or this patch? > > > > I'm actually learning how the test is working, so please help me to > > understand how I can solve it. > > > > There are 3 environments to run the test, sandbox, Qemu, and a real boa= rd. > > 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. Well, tbot and uboot-test-hooks implement the abstractions we have for things like "reset the target". > > 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 > > > > 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 > Indeed. >=20 > > > > If so, I think there are 2 issues to be solved. > > 1. change the capsule update testcase runable on Qemu > > 2. change my patch to handle the real reset correctly (not only > > waiting for the next boot, but also respawn it again) > > > > Do I understand correctly? >=20 > I think the best approach is to get your test running on sandbox, with > the faked reset. Don't worry about the other cases as we don't support > them. I don't think we need to test qemu/real hardware to start with. I think we should be testing real hardware in the near future however. Flash this U-Boot and confirm it's running is the point of the "version" test. --=20 Tom --x0PBmTWHB3bjoOVh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmIPzl8ACgkQFHw5/5Y0 tywZVwwAqpA3niKMAE9ED0xLgQHhFPd5bL3minnzQzELKbFjcyEqZNpdgP8Fk+H8 IdWdirrKDGLWO1vZcmMZU1KgkuXe9YcW/I+js3dx489znSWrunM8rHDUGX3N+Xci EblJY7zHv3KrbZyw8laZEz+ZzLo+RK7ugtH92WAHiXx2+rBYYZWV4ROE1bYtTKhd WsgdtR3l1dfxNLKhjQq3mbzY/J61TXkyZoCe5MLiXNTyymLAzLXL4IM1yBZnYi7l ubObfcugm3NUq8j+4NvGTZZtlsDL9o3gYDqmJ448mxrKAgJkyp8fDkZIkclDD7mY hkhRA+yeGeKoN+IWZm8zIpEybuJXEgmTJGfmYMS5W6b4247+OSGnFQI4qP+n+ff4 lRjuUmx67DqywbFpTz6qzaNxzNat12aiVav4hw7PC6pZ/JvpY2Bvar9ksC9kW7S7 WXo8qiQv4HP33c5u6h6k4rJICDiQQVMzVViq4jOAv47S1UBk9SO8sJq5XfSnEoPf FxdY+8Jy =2IVY -----END PGP SIGNATURE----- --x0PBmTWHB3bjoOVh--