All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>,
	u-boot@lists.denx.de, Joe Hershberger <joe.hershberger@ni.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH] tools: mkenvimage: Add pure shell implementation of mkenvimage
Date: Fri, 7 Feb 2025 08:40:30 +0100	[thread overview]
Message-ID: <20250207-universal-eatery-44004ec073fc@thorsis.com> (raw)
In-Reply-To: <b492494b-15a0-4b62-9600-40d9525b8a00@denx.de>

Hi Marek,

had a short look on your script yesterday.  Looks clean and well
designed, nice job.

Am Thu, Feb 06, 2025 at 09:38:58PM +0100 schrieb Marek Vasut:
> On 2/6/25 1:38 PM, Simon Glass wrote:
> > Hi Marek,
> > 
> > On Wed, 5 Feb 2025 at 07:37, Marek Vasut <marex@denx.de> wrote:
> > > 
> > > Add implementation of mkenvimage written purely in bourne shell.
> > > 
> > > This is not a replacement for mkenvimage tool, but rather a simple
> > > implementation which can be used in environments where mkenvimage
> > > itself cannot be deployed due to various constraints, like hardware
> > > manufacturing plants, but where bourne shell and basic tool are
> > > already available.
> > > 
> > > The external dependencies which are not shell built-ins are gzip
> > > and grep.
> > > 
> > > All mkenvimage parameters are implemented and compatible with the
> > > C implementation of mkenvimage.
> > > 
> > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > ---
> > > Cc: Joe Hershberger <joe.hershberger@ni.com>
> > > Cc: Tom Rini <trini@konsulko.com>
> > > ---
> > >   tools/mkenvimage.sh | 126 ++++++++++++++++++++++++++++++++++++++++++++
> > >   1 file changed, 126 insertions(+)
> > >   create mode 100755 tools/mkenvimage.sh
> > 
> > Would it be worth adding a simple test for this?
> Sure, is there an existing test for similar case I can look at ?

I thought about testing yesterday, but had no good idea on top, but
now it's discussed anyways …  How about throwing the same input
at the c and the sh version and assert the output is the same?  For
more sophisticated tests it should be tested with both variants.

Greets
Alex


  parent reply	other threads:[~2025-02-07  7:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 14:35 [PATCH] tools: mkenvimage: Add pure shell implementation of mkenvimage Marek Vasut
2025-02-06 12:38 ` Simon Glass
2025-02-06 20:38   ` Marek Vasut
2025-02-07  0:49     ` Simon Glass
2025-02-08 21:25       ` Marek Vasut
2025-02-07  7:40     ` Alexander Dahl [this message]
2025-02-08 21:26       ` Marek Vasut
2025-02-07 10:31 ` Rasmus Villemoes
2025-02-08 21:16   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250207-universal-eatery-44004ec073fc@thorsis.com \
    --to=ada@thorsis.com \
    --cc=joe.hershberger@ni.com \
    --cc=marex@denx.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.