diff options
author | Tom de Vries <tdevries@suse.de> | 2021-06-07 14:33:50 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-06-07 14:33:50 +0200 |
commit | 7ee8c127555c89781bcd9451cdea54884f6ac155 (patch) | |
tree | 34949a37167fbca1fcab2e104292b2e220f92b44 /gdb/python | |
parent | 6b5ba0d49e3d96454b4b43f8bc861394fcf694b6 (diff) | |
download | binutils-7ee8c127555c89781bcd9451cdea54884f6ac155.zip binutils-7ee8c127555c89781bcd9451cdea54884f6ac155.tar.gz binutils-7ee8c127555c89781bcd9451cdea54884f6ac155.tar.bz2 |
[gdb/testsuite] Fix info-types-c.exp
Recently, I've rewritten gdb.base/info-types.exp.tcl to do processing
line-by-line (commit 2129a942553).
When building gdb with -O0, this test passes for me, but with -O2 I sometimes
run into:
...
FAIL: gdb.base/info-types-c.exp: info types (state == 1)
...
The output the failing gdb_test_multiple is trying to parse is:
...
(gdb) info types^M
All defined types:^M
^M
File src/gdb/testsuite/gdb.base/info-types.c:^M
52: typedef enum {...} anon_enum_t;^M
...
(gdb)
...
and the FAIL with state == 1 means that:
- the regexp for "All defined types:" did trigger, and that
- the regexp for "File .*info-types.c" didn't trigger.
This is due to the fact that the empty line inbetween is supposed to be
matched by the "random line" regexp "^\r\n(\[^\r\n\]*)(?=\r\n)", which doesn't
happen because instead the earlier regexp consuming the gdb prompt matches.
Fix this by moving the "random line" regexp up. [ Note that that regexp does
not consume the gdb prompt, because it requires (but doesn't consume) a
terminating "\r\n".
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2021-06-07 Tom de Vries <tdevries@suse.de>
* gdb.base/info-types.exp.tcl (run_test): Move "random line" regexp
up.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions