aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-04-25 08:33:57 +0200
committerTom de Vries <tdevries@suse.de>2023-04-25 08:33:57 +0200
commitf57b5a395b153937b927a70a23e0c57a8af728d9 (patch)
tree96a00d0d7731d099892613f4bb56a6394ae30728
parentc2feffd819867b2d21c5d7e6b3b40377ef692415 (diff)
downloadgdb-f57b5a395b153937b927a70a23e0c57a8af728d9.zip
gdb-f57b5a395b153937b927a70a23e0c57a8af728d9.tar.gz
gdb-f57b5a395b153937b927a70a23e0c57a8af728d9.tar.bz2
[gdb/testsuite] Fix timeout in gdb.tui/corefile-run.exp
With test-case gdb.tui/corefile-run.exp we run into: ... WARNING: timeout in accept_gdb_output PASS: gdb.tui/corefile-run.exp: load corefile ... The timeout happens in this command: ... Term::command "core-file $core" ... because it tries to match "(gdb) $cmd" but $cmd is split over two lines: ... 16 (gdb) core-file /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.tui/co 17 refile-run/corefile-run.core 18 [New LWP 5370] 19 Core was generated by `/data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb 20 .tui/corefile-run/coref'. 21 Program terminated with signal SIGTRAP, Trace/breakpoint trap. 22 #0 main () at tui-layout.c:21 23 (gdb) ... Fix this by using send_gdb "$cmd\n" and wait_for "Program terminated" instead. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.tui/corefile-run.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp
index 6769dfb..a81d7e7 100644
--- a/gdb/testsuite/gdb.tui/corefile-run.exp
+++ b/gdb/testsuite/gdb.tui/corefile-run.exp
@@ -63,7 +63,8 @@ set text [Term::get_all_lines]
gdb_assert {![string match "No Source Available" $text]} \
"initial source listing"
-Term::command "core-file $core"
+send_gdb "core-file $core\n"
+Term::wait_for "Program terminated"
Term::check_contents "load corefile" "$src_line_nr *$src_line.*$gdb_prompt .*"
Term::command "run"