Re: [rfc] Increase match_max size for GDB testsuite?

Daniel Jacobowitz
2007-03-08T18:46:29Z

On Thu, Mar 08, 2007 at 07:39:00PM +0100, Ulrich Weigand wrote:
> 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.

I think that's accurate.

> 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 ...

The checkpoint tests have a similar problem, but nowhere else should.
Basically, there are two ways you can approach large tests: you can
make the buffer bigger, and perform regex matching on an increasingly
huge output, or you can match one line at a time and use exp_continue.
One example of this is in auxv.exp.

I'd mildly prefer that approach - the big buffer can be very slow, and
it just means we'll be back to the problem again later if another
target has even more registers.

--
Daniel Jacobowitz
CodeSourcery