From: David Laight <David.Laight@ACULAB.COM>
To: 'Simon Horman' <horms@kernel.org>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Aaron Conole <aconole@redhat.com>,
Adrian Moreno <amorenoz@redhat.com>,
Pravin B Shelar <pshelar@ovn.org>, Shuah Khan <shuah@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"dev@openvswitch.org" <dev@openvswitch.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>
Subject: RE: [PATCH net] selftests: openvswitch: Use bash as interpreter
Date: Wed, 19 Jun 2024 09:21:35 +0000 [thread overview]
Message-ID: <6084a57c191543568e6ec1828ec0efe4@AcuMS.aculab.com> (raw)
In-Reply-To: <20240617103337.GQ8447@kernel.org>
From: Simon Horman
> Sent: 17 June 2024 11:34
...
> > sidenote: I like very much the idea to use the least powerful tool, like
> > sh vs bash, awk vs gawk, but it breaks when we forget what is outside of
> > the scope of the former/standard.
> > Perhaps for shell, we could convert all the selftests at once?
>
> Thanks,
>
> Now that you mention it, I have the same feelings.
>
> Do we ever expect to use the minimal tools, when other
> parts of the test suite depend on the enhanced ones?
Certainly trying to avoid bash-isms seems like a good idea.
Especially in scripts where it isn't really that hard.
OTOH avoiding posix features (so the script will run on a traditional SYSV /bin/sh)
is probably excessive.
I'd use "${foo%"${foo#?}"}" to get the first character without bash-isms.
But, IIRC, one version of ash/dash made a 'pig's breakfast' of the nested
pattern match.
(Most syntax highlighters don't get the quoting right either...)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2024-06-19 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 8:28 [PATCH net] selftests: openvswitch: Use bash as interpreter Simon Horman
2024-06-17 10:05 ` Przemek Kitszel
2024-06-17 10:33 ` Simon Horman
2024-06-19 9:21 ` David Laight [this message]
2024-06-18 20:40 ` patchwork-bot+netdevbpf
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=6084a57c191543568e6ec1828ec0efe4@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=aconole@redhat.com \
--cc=amorenoz@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=pshelar@ovn.org \
--cc=shuah@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox