[RFA] testsuite: Avoid buffer overrun in gdb.base/default.exp
Pierre Muller
pierre.muller@ics-cnrs.unistra.fr
Fri Aug 6 14:59:00 GMT 2010
The attached patch fixes a full internal buffer problem
inside gdb.base/default.exp,
this is achieved by using gdb_test_multiple that
will empty the buffer on each regular expression match.
It also avoids an early return as it specifically
checks the prompt output that appear in the middle.
OK to apply:
Pierre Muller
Pascal language support maintainer for GDB
Tested on a GCC compile farm x86_64 linux machine:
diff pristine/gdb.sum patched/gdb.sum
< Test Run By muller on Fri Aug 6 12:10:06 2010
---
> Test Run By muller on Fri Aug 6 16:30:14 2010
3421,3424c3421,3423
< ERROR: internal buffer is full.
< UNRESOLVED: gdb.base/default.exp: info set
< FAIL: gdb.base/default.exp: info symbol
< FAIL: gdb.base/default.exp: info source
---
> PASS: gdb.base/default.exp: info set
> PASS: gdb.base/default.exp: info symbol
> PASS: gdb.base/default.exp: info source
3553,3555c3552,3553
< ERROR: internal buffer is full.
< UNRESOLVED: gdb.base/default.exp: show
< FAIL: gdb.base/default.exp: stepi "si" abbreviation
---
> PASS: gdb.base/default.exp: show
> PASS: gdb.base/default.exp: stepi "si" abbreviation
17026c17024
< KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in
multithreade
d app (PRMS: gdb/10116)
---
> PASS: gdb.threads/watchthreads2.exp: all threads incremented x
17318,17319c17316,17317
< # of expected passes 16310
< # of unexpected failures 132
---
> # of expected passes 16316
> # of unexpected failures 129
17323d17320
< # of unresolved testcases 2
testsuite ChangeLog entry:
2010-08-06 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.base/default.exp (info set): Avoid full buffer error and force
reading up to final gdb prompt.
(show): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsuite-default.exp
Type: application/octet-stream
Size: 4350 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100806/d968629b/attachment.obj>
More information about the Gdb-patches
mailing list