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 8A090C433EF for ; Sun, 27 Feb 2022 20:58:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2D70183B69; Sun, 27 Feb 2022 21:58:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (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="dFaf+zk8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 91EC383B68; Sun, 27 Feb 2022 21:58:54 +0100 (CET) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 4580283BA7 for ; Sun, 27 Feb 2022 21:58:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x733.google.com with SMTP id q4so8919608qki.11 for ; Sun, 27 Feb 2022 12:58:50 -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=BWQORPuZ+xH695/Yz10s4Q72ueAPD6HDxADQz/2OKPs=; b=dFaf+zk8DPXy4HjB/KEmmRSYWN/Y23TFfDsNcsam2Qmpum8jP+Bxn8Yp/UJhpI72Dq K7jhYooY1n1KoFvDXAKyCVkqyQlxMlF9EWuwVAh8sdBozYBu5ziYoB0zjo/QLRok3ufM B6CcPErAk2ro42RsMm57zOlkPIzY1ncHjnTLY= 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=BWQORPuZ+xH695/Yz10s4Q72ueAPD6HDxADQz/2OKPs=; b=qKI/ojKHwN0D7kub9NfCFed/ZfRKQK54z2/d7yRM1uIyWXdJ7ZIG2zyXP5eGcgM9D6 iy2DNuf3dTa5LSZLgByU5jVsQMRqV9TzRuwL2ChwlpV3WfEuuwKPdceKEjwCsRU70cqQ 0u5cmQX3LQsywuiKX0Oba9keGwMCShaCE5ba7SzqiTBVCRGYBLiPEflkVKlNxlsBdVj+ nROycqs0BdQEptsLuOXNy3S8BfetBfHJNJllsWsbD0vlL+TJeSG6XIZ5PlGJIiOjS+L/ iu7B2rK/DR4jqtYz7hL14y+fxej4tzhN0toKblTgKOeIjHnZzHkXFD89jujZ5UMf9Rdq 9CHg== X-Gm-Message-State: AOAM5336oUQ5tR+cvvNzfuoxF49UeTUzAaXjmFGtNcNnN7IG3i/cNHMW m3EtkE20I6HKNcbD4juXHfdaFA== X-Google-Smtp-Source: ABdhPJxocSVcVWBJ1HRR3g/3FH/T/E/YIL0QhpyhHozLzpG04qgyJ0jCC4rYv2BgeBLsZu25Mv6xLQ== X-Received: by 2002:a37:bf84:0:b0:648:ca1d:6b33 with SMTP id p126-20020a37bf84000000b00648ca1d6b33mr9688246qkf.573.1645995528959; Sun, 27 Feb 2022 12:58:48 -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 f19-20020a379c13000000b006490363756fsm4188690qke.21.2022.02.27.12.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 12:58:48 -0800 (PST) Date: Sun, 27 Feb 2022 15:58:45 -0500 From: Tom Rini To: Simon Glass Cc: 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 , Masami Hiramatsu Subject: Re: [PATCH v5 3/4] test/py: Handle expected reboot while booting sandbox Message-ID: <20220227205845.GK1576803@bill-the-cat> References: <164499213192.688621.17382243642029677399.stgit@localhost> <164499216253.688621.5866897494911875372.stgit@localhost> <20220227181419.GJ1576803@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="t/xij+/rrg19Q5ki" 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 --t/xij+/rrg19Q5ki Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 27, 2022 at 12:11:01PM -0700, Simon Glass wrote: > Hi Tom, >=20 > On Sun, 27 Feb 2022 at 11:14, Tom Rini wrote: > > > > On Sun, Feb 27, 2022 at 08:39:30AM -0700, Simon Glass wrote: > > > Hi Heinrich, > > > > > > On Sun, 27 Feb 2022 at 01:22, Heinrich Schuchardt wrote: > > > > > > > > On 2/26/22 19:37, Simon Glass wrote: > > > > > Hi Masami, > > > > > > > > > > On Tue, 15 Feb 2022 at 23:16, Masami Hiramatsu > > > > > wrote: > > > > >> > > > > >> Add expected_reset optional argument to ConsoleBase::ensure_spaw= ned(), > > > > >> ConsoleBase::restart_uboot() and ConsoleSandbox::restart_uboot_w= ith_flags() > > > > >> so that it can handle a reset while the 1st boot process after m= ain > > > > >> boot logo before prompt correctly. > > > > >> > > > > >> Signed-off-by: Masami Hiramatsu > > > > >> --- > > > > >> Changes in v5: > > > > >> - Rename parameter to expect_reset and update the description= to clarify > > > > >> the reset will happen between main boot and the command pro= mpt. > > > > >> --- > > > > >> test/py/u_boot_console_base.py | 48 +++++++++++++++++++++= +--------------- > > > > >> test/py/u_boot_console_sandbox.py | 7 ++++- > > > > >> 2 files changed, 33 insertions(+), 22 deletions(-) > > > > >> > > > > > > > > > > Didn't I already comment on this patch? Why did it come back? > > > > > > > > Dear Simon, > > > > > > > > The discussion is in > > > > https://patchwork.ozlabs.org/project/uboot/patch/164491595065.53685= 5.9457820061065514578.stgit@localhost/ > > > > > > > > You suggested: "We have a means to avoid actually doing the reset, = see > > > > the reset driver." > > > > > > > > We need a real reset on the sandbox and no fake reset as already sa= id in > > > > the referenced thread. > > > > > > Why? > > > > > > The fake reset is there for use by tests. We don't need this load of > > > Python code at all for sandbox. We should worry about it later. > > > > Well, isn't this going to make the tests more sandbox-centric then, and > > then need changes later to be able to test on real hardware? >=20 > Yes, but it keeps the sandbox case simple. At present the sandbox > tests can run within U-Boot (see the 'ut' command) and I very much > want to keep it that way. That is, after all, why I wrote the reset > driver. >=20 > While tests on real hardware have value, I hope that all logic bugs > are found on sandbox. Yes, it's important to test the code in sandbox before testing it on hardware, to avoid "obvious" oops-it-broke changes, it's still very important to be able to easily run this on real hardware. Ideally, I hope to see updates to the pytest hook repository to flash the hardware via capsule, as well as running a more formal pytest on hardware. To that end, is it not most important to make sandbox look like a real hardware platform, rather than adapt the test to know about special sandbox things? Or am I missing something here and the test shouldn't need changes / special handling to support both sandbox and real hardware, with what you're suggesting? --=20 Tom --t/xij+/rrg19Q5ki Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmIb5fwACgkQFHw5/5Y0 tyzuVAv+OscUc8jwQy/JvY5UeUrMW0VSsIoLiwv/X7eoiv357f7SeTYYppLjhLi4 tRmXJQ0bxWp4wHn2xiW9Tq0bUlRtbfCzgZxf4hInIYmQIL4WlSIt28Ghb98/aSyF 57wIXG8zVl0gELj9vQBwRMpj3eMXLswe1f5HPsthyM6ivvPH1PrwAHIesaRBofGX FPECdMIFI1MyzZUUjBCnogbqJJItcSDQMJn+EZZS+FD82/odSDxuEEWu6tMAcXIZ bIEyWxMqspJ8HdFpn371NHknk93Ey8ewmurYg52itOHl0SW0S74sq7mFvYAxW5d3 r98wzpcvGQ4g9/cP/tZTYBdHO7wCsh9kWc71Urd2rsASQvnD/P3kRxx7bsnyprQa T7VUrUFJ5V90q1/DAV0rIUUVDcYJxO5HENM2XWeNH9xPYa13v95rasnrcyPEt3Kn TOzkBucRmN1ZATijTkGYsmD4D7FuEfc1CLwUx1DZghBnVAWfI7/Pzu1xNU3TXcA3 b1drrV+v =gMlP -----END PGP SIGNATURE----- --t/xij+/rrg19Q5ki--