diff options
author | Pedro Alves <palves@redhat.com> | 2017-11-09 22:44:08 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-11-09 22:45:06 +0000 |
commit | c7a3851716f98540396b9e02be7d2fcd3bff2d29 (patch) | |
tree | 3840782860c29982490d032530ca6e946257386e /gdb/target-float.c | |
parent | f29f4b6ba198674096fddf2aa38fa8d028d387b2 (diff) | |
download | gdb-c7a3851716f98540396b9e02be7d2fcd3bff2d29.zip gdb-c7a3851716f98540396b9e02be7d2fcd3bff2d29.tar.gz gdb-c7a3851716f98540396b9e02be7d2fcd3bff2d29.tar.bz2 |
Fix racy output matching in gdb.base/completion.exp
Testing with:
$ make check-read1 TESTS="gdb.base/completion.exp"
Exposes a testcase bug that can result in racy fails:
FAIL: gdb.base/completion.exp: command-name completion limiting using tab character
ERROR: Undefined command "".
FAIL: gdb.base/completion.exp: symbol-name completion limiting using tab character
FAIL: gdb.base/completion.exp: symbol-name completion limiting using complete command
testsuite/gdb.log shows:
(gdb) PASS: gdb.base/completion.exp: set max-completions 5
p^G
passcount path print print-object printf
*** List may be truncated, max-completions reached. ***
(gdb) FAIL: gdb.base/completion.exp: command-name completion limiting using tab character
pcomplete p
Undefined command: "pcomplete". Try "help".
(gdb) ERROR: Undefined command "".
The problem is that the expect buffer can get filled with partial
output that ends in the gdb prompt, and so the default FAIL inside
gdb_test_multiple matches.
Fix that by splitting the gdb_test_multiple in two stages. Since that
is done in more than one place in the testcase, move the otherwise
duplicate code to helper procedures.
gdb/testsuite/ChangeLog:
2017-11-09 Pedro Alves <palves@redhat.com>
* gdb.base/completion.exp (ignore_and_resync, test_tab_complete):
New procedures, factored out from ...
(top level): ... here, and adjusted to avoid expecting beyond the
prompt in one go.
Diffstat (limited to 'gdb/target-float.c')
0 files changed, 0 insertions, 0 deletions