public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Don't timeout on prompt in gdb_start_cmd
@ 2022-11-11 14:52 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-11-11 14:52 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ac42aa228f3f1ebda16ddb53b993d6341dbbf100

commit ac42aa228f3f1ebda16ddb53b993d6341dbbf100
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Nov 11 15:52:10 2022 +0100

    [gdb/testsuite] Don't timeout on prompt in gdb_start_cmd
    
    We're currently running into a timeout at:
    ...
    (gdb) start ^M
    Error in expression, near `1'.^M
    (gdb) UNTESTED: gdb.ada/start.exp: start failed to land inside the right \
      procedure
    ...
    due to the fact that gdb_start_cmd doesn't handle a prompt as reaction to
    the start command.
    
    Fix this by handling the prompt.  Reduces execution time of the test-case from
    1m1s to 1s.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/lib/gdb.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d70b6410441..1240c2ef6f3 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -548,6 +548,7 @@ proc gdb_start_cmd { {inferior_args {}} } {
 	-notransfer -re "Starting program: \[^\r\n\]*" {
 	    return 0
 	}
+	-re "$gdb_prompt $" { }
     }
     return -1
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-11 14:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 14:52 [binutils-gdb] [gdb/testsuite] Don't timeout on prompt in gdb_start_cmd Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).