[Bash-completion-devel] Weird compopt.exp unit test problem

Ville Skyttä ville.skytta at iki.fi
Sun Feb 7 19:24:31 UTC 2010


Hello,

I upgraded from Fedora 11 to Fedora 12 and the compopt unit test started 
failing in a bizarre way.  bash is now 4.0.35 but it doesn't seem to matter as 
the failure happens also with the same 3.2.x versions I was testing with.

$ ./runUnit compgen.exp
[...]
Running ./unit/compgen.exp ...
FAIL: assert_bash_exec {cd $TESTDIR} at timeout
ERROR Unexpected output from bash command "cd $TESTDIR":
^C
/fixtures/compgenERROR executing bash command "cd $TESTDIR"FAIL: teardown at 
timeout

...and things go south from there in somewhat inconsistent manner (let's look 
at that later when the first issue is fixed if I can still reproduce).

This is what I see in log/unit.log (ditto dbg.log, I didn't notice anything 
more interesting in it):

[...]
/@Running ./unit/compgen.exp ...
{ set; declare -F; shopt -p; } > $TESTDIR/tmp/env.env1~
/@echo $?
0
/@cd fixtures/compgen
/fixtures/compgen/@echo $?
0
/fixtures/compgen/@compgen -f a\\\'b/
a\'b/c
PASS: compgen -f a\\\'b/ on bash-4 should return a\'b/c
/fixtures/compgen/@^C
/fixtures/compgen/@d $TESTDIR
bash: d: command not found
/fixtures/compgen/@FAIL: assert_bash_exec {cd $TESTDIR} at timeout
ERROR Unexpected output from bash command "cd $TESTDIR":
^C
/fixtures/compgenERROR executing bash command "cd $TESTDIR"echo $?
127
/fixtures/compgen/@^C
/fixtures/compgen/@ set; declare -F; shopt -p; } > $TESTDIR/tmp/env.env2~
bash: syntax error near unexpected token `}'
[...]

Huh, why does it end up invoking "d $TESTDIR" instead of "cd $TESTDIR", and I 
suppose the first char of the "{ set; ... " command got lost too?  I tried 
bisecting but didn't find any particular commit that causes this so I suppose 
it's something related to my environment.  Other unit and completion tests 
appear to work fine.  Ideas?

$ rpm -q expect tcllib tcl bash dejagnu
expect-5.43.0-19.fc12.x86_64
tcllib-1.11.1-3.fc12.noarch
tcl-8.5.7-5.fc12.x86_64
bash-4.0.35-2.fc12.x86_64
dejagnu-1.4.4-17.fc12.noarch



More information about the Bash-completion-devel mailing list