diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-11-29 15:26:18 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-12-08 18:06:26 +0000 |
commit | e59d0ad9bf8dfc4002835c8eee9e70e951c63d64 (patch) | |
tree | aa0b56a8f00208c4fc33f9739a89b20084feae9d /gdb/testsuite/gdb.cp/local.exp | |
parent | 8fd5a6058fc14e1d460fa166457f949e23e50b5f (diff) | |
download | gdb-e59d0ad9bf8dfc4002835c8eee9e70e951c63d64.zip gdb-e59d0ad9bf8dfc4002835c8eee9e70e951c63d64.tar.gz gdb-e59d0ad9bf8dfc4002835c8eee9e70e951c63d64.tar.bz2 |
gdb/testsuite: fix gdb.ada/complete.exp timeout in READ1 mode
While reviewing another patch I spotted a timeout in
gdb.ada/complete.exp when testing in READ1 mode, e.g.:
$ make check-read1 TESTS="gdb.ada/complete.exp"
...
FAIL: gdb.ada/complete.exp: complete break ada (timeout)
...
The problem is an attempt to match the entire output from GDB within a
single gdb_test_multiple pattern, for a completion command that
returns a large number of completions.
This commit changes the gdb_test_multiple to process the output line
by line. I don't use the gdb_test_multiple -lbl option, as I've
always found that option backward -- it checks for the \r\n at the
start of each line rather than the end, I think it's much clearer to
use '^' at the start of each pattern, and '\r\n' at the end, so that's
what I've done here.
.... Or I would, if this test didn't already define $eol as the end of
line regexp ... except that $eol was set to '[\r\n]*', which isn't
that helpful, so I've updated $eol to be just '\r\n' the actual end of
line regexp.
And now, the test passes without a timeout when using READ1.
There should be no change in what is tested after this commit.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.cp/local.exp')
0 files changed, 0 insertions, 0 deletions