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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DD6BC432BE for ; Wed, 25 Aug 2021 22:24:40 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5CC936109E for ; Wed, 25 Aug 2021 22:24:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5CC936109E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA1BC82C30; Thu, 26 Aug 2021 00:24:36 +0200 (CEST) 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="m3Oq0s6F"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5073182C90; Thu, 26 Aug 2021 00:24:34 +0200 (CEST) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 B270F81F7B for ; Thu, 26 Aug 2021 00:24:29 +0200 (CEST) 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-qk1-x734.google.com with SMTP id b64so1325257qkg.0 for ; Wed, 25 Aug 2021 15:24:29 -0700 (PDT) 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:user-agent; bh=ayrziKi7K3/mbjPd2LBXKkP80+k/XFJ4V3IKMm1kl1E=; b=m3Oq0s6FnPvmmUTl826S1Hpr3fGRyBo+imb3hWuElYhagiTkkbhLpOaTBLctGNEvnl 0MhWNbtcZY7BshFtGxgjZeeBfm/2WywQD3n11S/nAaKSJ+NAdQpf4DuGx/g4yFVlM09+ qwqpPr0MC3sxQf4obxO7ybEQgxsCnfOkL/M3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ayrziKi7K3/mbjPd2LBXKkP80+k/XFJ4V3IKMm1kl1E=; b=cXfUbXAmxS2Zk2sE2Z5W+tFKFil1g1YPHwrjIlFQuosM4IUeVGi2QRuqD6TMSikPdb BsMY/rm3CKy4qCVUQKCWTDN6IsIdD2PMbQOPYF3IzXqjj2MNPplAmzg8RV9znuWncrNB 4ixJJrhVBLkuBiEO4LIyCLslLJX8HZqDZJSD1OaWcaxjHGRoUu/av0CO5zoDjZpTsdvu kueXtwMwqTqgTRFsJcvXpEWiHrFBx0v8XpvvJ+5SBbCkOTpIxaOG3Eb1eTdNLw1Z7ZG+ yX7Y67KWK8n2+nH5wfsDwUIWVLWy03PnU7swRrDhNWsis0ZqPCgLvwcrvBt1SBj5mHqy Xr2A== X-Gm-Message-State: AOAM532mEfhGKxnC1w5ar7JTvRDlvnHjyFHWe67RF5aV3dtjB2xJ/HIm tRrUEQhpkC56cGv5BHIHhchnLQ== X-Google-Smtp-Source: ABdhPJy5D3k6Mes9coO+AXZeOAG6s73mIZPqKvyow1BpTNK8V+KVIu22iQVpbatkDnIX3skcKWvzqQ== X-Received: by 2002:a37:8505:: with SMTP id h5mr840252qkd.241.1629930268462; Wed, 25 Aug 2021 15:24:28 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-519a-4843-2801-9790.res6.spectrum.com. [2603:6081:7b01:cbda:519a:4843:2801:9790]) by smtp.gmail.com with ESMTPSA id e2sm1006045qkd.2.2021.08.25.15.24.27 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Aug 2021 15:24:27 -0700 (PDT) Date: Wed, 25 Aug 2021 18:24:25 -0400 From: Tom Rini To: Simon Glass Cc: Francis Laniel , U-Boot Mailing List , Michael Trimarchi , Marek =?iso-8859-1?Q?Beh=FAn?= , Wolfgang Denk , Harald Seiler Subject: Re: How should we deal with actual hush odd behavior? Message-ID: <20210825222425.GC858@bill-the-cat> References: <2787647.e9J7NaK4W3@pwmachine> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Gpi/WSqYxzoUlEMK" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean --Gpi/WSqYxzoUlEMK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 20, 2021 at 12:22:22PM -0600, Simon Glass wrote: > Hi Francis, >=20 > On Fri, 20 Aug 2021 at 10:12, Francis Laniel > wrote: > > > > Hi. > > > > > > I hope you are fine and the same for your family and friends. > > > > In July, a proposal to add a new shell for U-Boot was posted on the mai= ling > > list [1]. > > The community discussed a lot about this changes, some people did not a= gree > > with it because the new shell is not compatible with the actual one (hu= sh) > > [2]. > > So, a proposal to update U-Boot actual hush to follow what they current= ly have > > in Busybox was made [3]. > > > > Porting 2021 Busybox hush to U-Boot seems, for me, to be a good idea as= we > > would benefit from Busybox bug fixes as well as being compatible with a= ctual > > hush (in theory). > > We could also add new features to U-Boot hush, like functions, as they = were > > added to Busybox. > > > > Nonetheless, the idea of this port is to be compatible. > > In practice, I noted some cases when this is actually not the case. > > The first one can be related to how && and || operators were handled in= hush. > > So, the following: false && false || true > > Returns 0 on Busybox 2021 hush and 1 on U-Boot. > > The behavior of 2021 is coherent with the definition of these operators= [4]: > > > The return status of AND and OR lists is the exit > > > status of the last command executed in the list. > > An other example concerns variable expansion, where foo=3D'bar "quux" is > > expanded to bar quux in U-Boot and bar "quux in Busybox. > > > > I do not have a real opinion on the second one, as I think local variab= le set > > in U-Boot scripts are quite simple as people do not try to do: foo=3D"b= ar \"quux > > 'quuz' \"\"\"corge". > > The first one is maybe more problematic. > > Grepping "if test" shows me that the more complex if condition seems to= be > > under the form: > > if first_test_ AND/OR second_test > > Here also, people seems to no try to write complex expression like: foo= || > > bar; echo quux && quuz. > > > > So, porting Busybox 2021 hush can solve bugs we have currently in U-Boo= t, but > > what if fixing these bugs lead to a board script failing and so a devic= e not > > booting... > > I would like to have the opinion of the community on this question. >=20 > My feeling is that we should go with the newer (correct?) behaviour. > Boards not booting can be found with the existing release process. >=20 > Also if we keep the old hush around for a while people can still use > it, particularly if it is much smaller. I would at this point echo this sentiment as well. Thanks! --=20 Tom --Gpi/WSqYxzoUlEMK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEmwxIACgkQFHw5/5Y0 tyzd9wv/R3+bnj7z+2VWGP6mcJI7sSiJiQcfSwF/xCGSybkQy4S6nMMVf2tmeOWx DzYL30dJpbe6JZACaW23A5rKs8IKw/3EyFJcKiAyJcggd2T2o+LEgcZpRxZ3g25S lxGdG/o7zHlaFYYXojftHrPy63Z5zy9apPCfdXbi5ZHRV8S6F5Gfn2WCHGJ92Uuv slsFlzhdNGy9/A9K/SD8SQStyYPsI5HKxbmXmPughxpCVlvHdaHhG6vTzcpwZrfc 1QknFGC9m7pe/QAykEz25JAIxk2HO3sJVlbK+HwNyDqYSjXyF24XJ9UBJsZKAu8W xV+OTe8wUAXBSoo/NEhg45KQnSqQklDkY7vvCZFd3q5DlJOI9nLkbOGIeHtX+2Ch 90WkRXeAfWPn4ZVVIzS9Hh//nfsACdC/nCBFnCLPCKxueiG0XvWkzZyGlOKCBzyv DbxhoUlb0/T8hja99LthUqlvdvvIka4ZBpzS7HdDOFAloEUTn5QK7gydiIr5jADO YrteoKis =83de -----END PGP SIGNATURE----- --Gpi/WSqYxzoUlEMK--