[rfc] Increase match_max size for GDB testsuite?

Ulrich Weigand
2007-03-08T18:39:13Z

Hello,

I'm seeing (somewhat random) failures in callfuncs.exp on spu, which
appear to be caused by the length of the "info all-registers" output
on the platform.

I'm no dejagnu/expect expert, but seems to me there is a buffer size
that is being set to 20000 in lib/gdb.exp, and if any response from
the inferior exceeds this size, it's not completly predictable what
happens.

Now, since we have 128 registers on the SPU, and each is printed using
a union of 7 different types, the output of "info all-registers" is
quite long, in the range of 50000 bytes. This exceeds the above limit,
and sometimes causes the test case to fail with
"ERROR: internal buffer is full."

Note that I've seen the same problem in the past with checkpoint.exp
on s390x-ibm-linux (when retrieving the list of 600 checkpoints),
so it doesn't appear to be a spu-only issue.

By simply increasing the "match_max" argument in default_gdb_init,
those failures go away. I didn't notice any adverse effects either,
so I'd like to make that change -- however, if anybody has a better
solution to the problem, please let me know ...

Bye,
Ulrich

Index: gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.78
diff -c -p -r1.78 gdb.exp
*** gdb/testsuite/lib/gdb.exp 23 Jan 2007 17:11:55 -0000 1.78
--- gdb/testsuite/lib/gdb.exp 8 Mar 2007 18:12:31 -0000
*************** proc default_gdb_init { args } {
*** 1952,1958 ****

# Uh, this is lame. Really, really, really lame. But there's this *one*
# testcase that will fail in random places if we don't increase this.
! match_max -d 20000

# We want to add the name of the TCL testcase to the PASS/FAIL messages.
if { [llength $args] > 0 } {
--- 1952,1958 ----

# Uh, this is lame. Really, really, really lame. But there's this *one*
# testcase that will fail in random places if we don't increase this.
! match_max -d 100000

# We want to add the name of the TCL testcase to the PASS/FAIL messages.
if { [llength $args] > 0 } {