Thread (2 messages) flat view 2 messages, 1 author, 2020-08-05

Re: ethtool-5.8: test-driver uses bashisms

From: Michal Kubecek <hidden>
Date: 2020-08-05 16:37:49

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help