From: Tom de Vries Date: Tue, 25 Apr 2023 06:33:57 +0000 (+0200) Subject: [gdb/testsuite] Fix timeout in gdb.tui/main.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f35613934c9cff986e74ed11c2a141756f4de469;p=binutils-gdb.git [gdb/testsuite] Fix timeout in gdb.tui/main.exp With test-case gdb.tui/main.exp we run into: ... WARNING: timeout in accept_gdb_output PASS: gdb.tui/main.exp: show main after file ... The problem is that this command: ... Term::command "file [standard_output_file $testfile]" ... tries to match "(gdb) $cmd", but due to the long file name, $cmd is split up over two lines: ... 16 (gdb) file /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.tui/main/ma 17 in 18 Reading symbols from /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.t 19 ui/main/main... 20 (gdb) ... Fix this by matching "Reading symbols from" instead. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.tui/main.exp b/gdb/testsuite/gdb.tui/main.exp index 7fc9969044f..9cd3ce8a96d 100644 --- a/gdb/testsuite/gdb.tui/main.exp +++ b/gdb/testsuite/gdb.tui/main.exp @@ -40,7 +40,8 @@ if {![Term::enter_tui]} { return } -Term::command "file [standard_output_file $testfile]" +send_gdb "file [standard_output_file $testfile]\n" +gdb_assert { [Term::wait_for "Reading symbols from"] } "file command" Term::check_contents "show main after file" \ [string_to_regexp "|___[format %06d $nr]_$line"]