From: Tom de Vries Date: Mon, 18 Aug 2025 14:17:15 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.tui/tui-mode-switch.exp on aarch64 X-Git-Tag: gdb-17-branchpoint~262 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d412728cda0e7d14a46cfbe6beb6e2c65088f301;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix gdb.tui/tui-mode-switch.exp on aarch64 On aarch64-linux, occasionally I run into these warnings: ... PASS: gdb.tui/tui-mode-switch.exp: set style enabled off WARNING: timeout in accept_gdb_output PASS: gdb.tui/tui-mode-switch.exp: no boo WARNING: timeout in accept_gdb_output ... The first in more detail: ... Box Dump (40 x 1) @ (0, 11): 11 b(gdb) b WARNING: timeout in accept_gdb_output ... Fix this by waiting for a prompt after leaving TUI before sending "b". Also, while we're at it generate a few more passes. Tested on aarch64-linux. --- diff --git a/gdb/testsuite/gdb.tui/tui-mode-switch.exp b/gdb/testsuite/gdb.tui/tui-mode-switch.exp index 827677c39b9..c60596213b8 100644 --- a/gdb/testsuite/gdb.tui/tui-mode-switch.exp +++ b/gdb/testsuite/gdb.tui/tui-mode-switch.exp @@ -30,16 +30,21 @@ for { set i 1 } { $i <= 11 } { incr i } { # Type "foo". send_gdb "foo" set line { 0 11 40 1 } -Term::wait_for_region_contents {*}$line "^$gdb_prompt foo" +gdb_assert { [Term::wait_for_region_contents {*}$line "^$gdb_prompt foo"] } \ + "type foo" # Enter TUI. send_gdb "\030\001" -Term::wait_for "" +gdb_assert { [Term::wait_for ""] } "enter TUI" -# Exit TUI, type b. +# Exit TUI. send_gdb "\030\001" +gdb_assert { [Term::wait_for ""] } "exit TUI" + +# Type b. send_gdb "b" -Term::wait_for_region_contents {*}$line "^$gdb_prompt b" +gdb_assert { [Term::wait_for_region_contents {*}$line "^$gdb_prompt b"] } \ + "type b" # Check that we don't see "boo". gdb_assert { ![Term::check_region_contents_p {*}$line "^$gdb_prompt boo"] } \