diff options
author | Tom de Vries <tdevries@suse.de> | 2023-04-25 08:33:57 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-04-25 08:33:57 +0200 |
commit | d8d3edbfa3870c984d3ef74fbaf312d938e3df09 (patch) | |
tree | 4797efbd1735caaff5741d33d7addf816a70daf6 | |
parent | f35613934c9cff986e74ed11c2a141756f4de469 (diff) | |
download | gdb-d8d3edbfa3870c984d3ef74fbaf312d938e3df09.zip gdb-d8d3edbfa3870c984d3ef74fbaf312d938e3df09.tar.gz gdb-d8d3edbfa3870c984d3ef74fbaf312d938e3df09.tar.bz2 |
[gdb/testsuite] Fix timeout in gdb.tui/new-layout.exp
In test-case gdb.tui/new-layout.exp we run into:
...
WARNING: timeout in accept_gdb_output
PASS: gdb.tui/new-layout.exp: layout=cmd_only {cmd 1} {} {}: \
bottom of cmd window is blank
...
The timeout happens here:
...
Term::command "layout src"
...
Before the "layout src" command we have:
...
Screen Dump (size 80 columns x 24 rows, cursor at column 46, row 7):
0 +-tui-layout.c-------------------------+(gdb) layout example3
1 | 20 { |(gdb) layout src
2 | 21 return 0; |(gdb) winheight cmd 8
3 | 22 } |(gdb) layout example4
4 | 23 |(gdb) layout src
5 | 24 |(gdb) winheight cmd 8
6 | 25 |(gdb) layout example5
7 | 26 |(gdb)
8 | 27 |
9 | 28 |
10 | 29 |
11 | 30 |
12 | 31 |
13 | 32 |
14 | 33 |
15 | 34 |
16 | 35 |
17 | 36 |
18 | 37 |
19 | 38 |
20 | 39 |
21 | 40 |
22 +--------------------------------------+
23 exec No process In: L?? PC: ??
...
and after:
...
Screen Dump (size 80 columns x 24 rows, cursor at column 6, row 16):
0 +-tui-layout.c-----------------------------------------------------------------+
1 | 20 { |
2 | 21 return 0; |
3 | 22 } |
4 | 23 |
5 | 24 |
6 | 25 |
7 | 26 |
8 | 27 |
9 | 28 |
10 | 29 |
11 | 30 |
12 | 31 |
13 | 32 |
14 +------------------------------------------------------------------------------+
15 exec No process In: L?? PC: ??
16 (gdb)
17
18
19
20
21
22
23
...
The Term::command "layout src" is waiting to match:
- "(gdb) layout src", and then
- "(gdb) ".
The first part fails to match on a line:
...
| 26 |(gdb) layout src
...
because it expects the prompt at the start of the line.
Fix this by allowing the prompt at the start of a window as well.
Tested by x86_64-linux.
-rw-r--r-- | gdb/testsuite/lib/tuiterm.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index bb46291..fa703fc 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -850,7 +850,7 @@ namespace eval Term { global gdb_prompt send_gdb "$cmd\n" set str [string_to_regexp $cmd] - set str "^$gdb_prompt $str" + set str "(^|\|)$gdb_prompt $str" wait_for $str } |