aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-08-18 16:17:15 +0200
committerTom de Vries <tdevries@suse.de>2025-08-18 16:17:15 +0200
commitd412728cda0e7d14a46cfbe6beb6e2c65088f301 (patch)
tree2c02c19fcd5984fe47b604c4c2a93c3ce05bba83
parent5bef3e65ec3ffdc03b1c678f21b4e16007ff03ea (diff)
downloadbinutils-d412728cda0e7d14a46cfbe6beb6e2c65088f301.zip
binutils-d412728cda0e7d14a46cfbe6beb6e2c65088f301.tar.gz
binutils-d412728cda0e7d14a46cfbe6beb6e2c65088f301.tar.bz2
[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.
-rw-r--r--gdb/testsuite/gdb.tui/tui-mode-switch.exp13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.tui/tui-mode-switch.exp b/gdb/testsuite/gdb.tui/tui-mode-switch.exp
index 827677c..c605962 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"] } \