Bash in Feisty is not compatible with LTP 20070331

Bug #102720 reported by Hooman
4
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: bash

My Ubuntu kernel version: 2.6.20-12-server #2 SMP (7.0.4 beta AMD64 server edition)
My Bash version: GNU bash, version 3.2.10(1)-release (x86_64-pc-linux-gnu)
My LTP version is 20070331

When compiling the LTP, I get the following error:
make[4]: Entering directory `/ltp-full-20070331/testcases/network/tcp_cmds/ftp'
../../generate.sh
../../generate.sh: 60: arith: syntax error: "cnt--"

Revision history for this message
Matthias Klose (doko) wrote :

please add a testcase (generate.sh) to the bug report

Changed in bash:
status: Unconfirmed → Needs Info
Revision history for this message
Micah Cowan (micahcowan) wrote :

Given the error, it is extremely likely that it is dash being used, not bash. Dash does not recognize syntax like $((foo--)), which is not required by POSIX (although, it also fails to recognize $((foo-1)), which is). If this is the case, the fault lies with LTP, which relies upon unportable syntax. The workaround would be to set SHELL within the makefile to bash, explicitly.

(Not setting status until this can be confirmed one way or the other.)

Revision history for this message
Hooman (hooman118) wrote :

The file "generate.sh" is attached.

Revision history for this message
Hooman (hooman118) wrote :

PS, the source code of LTP which I used is downloaded from here "http://nchc.dl.sourceforge.net/sourceforge/ltp/ltp-full-20070331.tgz"

Revision history for this message
Micah Cowan (micahcowan) wrote :

The #! line at the top refers to #!/bin/sh, which in Edgy and on is dash, not bash. As I stated previously, this syntax is not portable across bourne shells. As a workaround, you can change the #! line to refer to /bin/bash instead. You should probably add SHELL=/bin/bash at the top of the toplevel Makefile. Please notify the authors of the LTP of this problem.

I will now be closing this bug out, as it has been determined that this is not a bug with bash, nor with Ubuntu.

Changed in bash:
status: Needs Info → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.