Re: [PATCH libgpiod 2/4] tools: tests: use $@ instead of $*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 27, 2024 at 12:24 PM Kent Gibson <warthog618@xxxxxxxxx> wrote:
>
> On Mon, May 27, 2024 at 11:49:09AM +0200, Bartosz Golaszewski wrote:
> > On Sat, May 25, 2024 at 3:54 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> > >
> > > On Fri, May 24, 2024 at 08:03:28PM +0200, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> > > >
> > > > $@ does not break up quoted arguments which is what we want in all cases
> > > > in the bash test-suite. Use it instead of $*.
> > > >
> > >
> > > I believe it needs to be "$@".  Everywhere.
> > >
> > > Where do we use quoted arguments/whitespaced parameters?
> > > So this is purely about "good" shell?  In that case why stop here - e.g.
> > > shellcheck picks up a load more "Double quote to prevent splitting/globbing"
> > > and the like.
> > >
> >
> > You're not wrong but I have an impression that this is just a
> > sarcastic way of telling me this change is not needed. Could you
> > confirm?
> >
>
> Me? Sarcastic? ;-)  Well, yes and no, but mainly no.
>
> Strictly speaking, the change is not needed, given the functions in question
> are only used internally and we know whitespace is not an issue.
>
> OTOH, I'm fine with this change, but I do think in that case we should fix
> everything, to some accepted standard of "good" shell.
> I believe Andy suggested the same.  I happened to suggest shellcheck as the
> standard as that is what my editor happened to be using.
> Happy to go with something else if you have a better alternative.
>

No, you're right, let's bring it up to shellcheck's standard.

> If you want to apply this series (after fixing the "$@"), I'm happy to patch
> that to correct all the other things that shellcheck throws up - there are
> lots.
>

Sure, knock yourself out. Resend the series with this fixed then.

> Then if we do happen to make use of whitespace in the future we're good.
>
> Cheers,
> Kent.

Thanks,
Bart





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux