On 1/26/25 07:29, Collin Funk wrote:
On AIX, /bin/sh causes a testsuite failure with an output like this:
Running
/home/collinfunk/findutils-4.10.0.40-d4417/find/testsuite/find.gnu/execdir-multiple.exp
...
FAIL: execdir-multiple.new-O0, ./runme[6]: syntax error at line 7 :
`newline or ;' unexpected
./runme[6]: syntax error at line 7 : `newline or ;' unexpected
./runme[6]: syntax error at line 7 : `newline or ;' unexpected
./runme[6]: syntax error at line 7 : `newline or ;' unexpected
Here is a small test program to show the issue:
$ cat test.sh
#!/bin/sh
for arg;
do
echo "$arg"
done
$ ./test.sh a b c
test.sh[3]: 0403-057 Syntax error at line 4 : `newline or ;' is not
expected.
But, if we move the 'do' AIX /bin/sh no longer chokes:
$ cat test.sh
#!/bin/sh
for arg; do
echo "$arg"
done
bash-5.2$ ./test.sh a b c
a
b
c
Normally I don't think this is worth fixing. But since it only affects
one test case I have attached a patch that fixes it.
Collin
Thanks, perfect. Pushed at:
https://git.sv.gnu.org/cgit/findutils.git/commit/?id=faa13013686b
Have a nice day,
Berny