This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Testsuite: Change match_max for current also
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 2 Oct 2009 15:58:15 +0200
- Subject: [RFA] Testsuite: Change match_max for current also
I got several "internal buffer full" errors
in the results of the testsuite, especially on gcc16.
I finally discovered that the expect command
match_max is made for that:
change the size of the internal buffer used for
pattern matching.
In lib/gdb.exp, I found this:
match_max -d 30000
But then, in several other tests
(gdb.base/annota1.exp, gdb.base/annota3.exp and gdb.base/maint.exp),
that said that they wanted to increase the size
of the buffer, but used smaller values than the 30000
above... I was lost :(
In annota1.exp, I found that:
verbose "match_max local is: [match_max]"
verbose "match_max default is: [match_max -d]"
# This is necessary because a 2000 buffer is not enought to get
everything
# up to the prompt ad the test gets a timeout.
match_max 3000
verbose "match_max now is: [match_max]"
Running annota1.exp with -v option in RUNTESTFLAGS,
I discovered that the local value of match_max still was the
expect default of 2000...
After digging into the expect sources, I found out
that using
match_max -d 3000
changes the default value, but only for later started jobs,
meaning that it does not change the current value.
Adding
'match_max [match_max -d]'
right after 'match_max -d 30000'
did fix the problem!
This removes a "internal buffer full" ERROR
in gcc16 testsuite on
gdb.server/ext-run.exp: get process list
Is this OK?
Pierre Muller
PS1: If this is approved, we should also
consider what to do about the three tests
that set another value of match_max
(lower than the 30000).
PS2: calling 'match_max -d 30000'
several times is a waste of time,
as long as nothing changes that default value
in any of the tests, should it rather be
extracted out of default_gdb_init,
so that it get executed only once?
gdb/testsuite/ChangeLog entry:
2009-10-02 Pierre Muller <muller@ics.u-strasbg.fr>
* lib/gdb.exp (default_gdb_init): Set current value of match_max
to default.
Index: src/gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.119
diff -u -F^proc -r1.119 gdb.exp
--- src/gdb/testsuite/lib/gdb.exp 13 Jul 2009 19:24:18 -0000
1.119
+++ src/gdb/testsuite/lib/gdb.exp 2 Oct 2009 13:28:57 -0000
@@ -2326,6 +2326,8 @@ proc default_gdb_init { args } {
# a very large amount of output. We therefore increase the expect
# buffer size to be able to contain the entire test output.
match_max -d 30000
+ # Also set this value for the currently running GDB.
+ match_max [match_max -d]
# We want to add the name of the TCL testcase to the PASS/FAIL
messages.
if { [llength $args] > 0 } {