Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: ethtool-5.8: test-driver uses bashisms
       [not found] <20200805084606.0593491a@abudhabi.paradoxon.rec>
@ 2020-08-05 11:03 ` Michal Kubecek
  2020-08-05 20:27   ` Michal Kubecek
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Kubecek @ 2020-08-05 11:03 UTC (permalink / raw)
  To: Lars Wendler; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

On Wed, Aug 05, 2020 at 08:46:06AM +0200, Lars Wendler wrote:
> Hi Michal,
> 
> I hope you are the right person to reach out for this matter.
> 
> Running the test-driver script from ethtool-5.8 release with /bin/dash
> results in an endless loop that constantly emits the following two
> lines:
> 
>   ./test-driver: 62: [: --test-name: unexpected operator
>   ./test-driver: 78: [[: not found
> 
> This is because the script contains two bashisms which make the while
> loop to never exit when the script is not being run with a shell that
> knows about these bash extensions.
> 
> The attached patch fixes this.

This is really unfortunate. The problem is that this script is not part
of ethtool codebase, it is copied from automake installation instead.
In this case, the script using [[...]] comes from automake 1.15 (which
I have on my development system).

AFAICS automake 1.16 has a newer version of test-driver script and the
main difference is the use of [...] tests instead of [[...]]. I'll
update automake on my development machine and open a bug to backport the
change to openSUSE Leap 15.2 package to prevent repeating this problem.

Michal

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ethtool-5.8: test-driver uses bashisms
  2020-08-05 11:03 ` ethtool-5.8: test-driver uses bashisms Michal Kubecek
@ 2020-08-05 20:27   ` Michal Kubecek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Kubecek @ 2020-08-05 20:27 UTC (permalink / raw)
  To: Lars Wendler; +Cc: netdev

On Wed, Aug 05, 2020 at 01:03:30PM +0200, Michal Kubecek wrote:
> On Wed, Aug 05, 2020 at 08:46:06AM +0200, Lars Wendler wrote:
> > Hi Michal,
> > 
> > I hope you are the right person to reach out for this matter.
> > 
> > Running the test-driver script from ethtool-5.8 release with /bin/dash
> > results in an endless loop that constantly emits the following two
> > lines:
> > 
> >   ./test-driver: 62: [: --test-name: unexpected operator
> >   ./test-driver: 78: [[: not found
> > 
> > This is because the script contains two bashisms which make the while
> > loop to never exit when the script is not being run with a shell that
> > knows about these bash extensions.
> > 
> > The attached patch fixes this.
> 
> This is really unfortunate. The problem is that this script is not part
> of ethtool codebase, it is copied from automake installation instead.
> In this case, the script using [[...]] comes from automake 1.15 (which
> I have on my development system).
> 
> AFAICS automake 1.16 has a newer version of test-driver script and the
> main difference is the use of [...] tests instead of [[...]]. I'll
> update automake on my development machine and open a bug to backport the
> change to openSUSE Leap 15.2 package to prevent repeating this problem.

Correction: upstream automake has a version of the script which does not
use bash specific constructions ("==" and "[[ ... ]]"). These come from
a distribution patch introduced in openSUSE Leap 15.1 and 15.2 package
to fix command line argument handling. openSUSE Tumbleweed has fixed
version of the script which uses universal "=" and "[ ... ]".

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-05 20:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200805084606.0593491a@abudhabi.paradoxon.rec>
2020-08-05 11:03 ` ethtool-5.8: test-driver uses bashisms Michal Kubecek
2020-08-05 20:27   ` Michal Kubecek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).