public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thiago Bauermann <bauermann@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/testsuite: Use default gdb_expect timeout in runto
Date: Mon, 22 Apr 2024 16:13:10 +0000 (GMT)	[thread overview]
Message-ID: <20240422161311.0A0993860759@sourceware.org> (raw)

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

commit fdaa4939e5024ea809c0d4d1aa6043a60b37d9b5
Author: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Date:   Thu Apr 4 14:22:22 2024 -0300

    gdb/testsuite: Use default gdb_expect timeout in runto
    
    runto uses a hard-coded timeout of 30s in its invocation of gdb_expect.
    This is normally fine, but for very a slow system (e.g., an emulator) it
    may not be enough time for GDB to reach the intended breakpoint.
    
    gdb_expect can obtain a timeout value from user-configurable variables
    when it's not given one explicitly, so use that mechanism instead since
    the user will have already adjusted the timeout variable to account for
    the slow system.
    
    Approved-By: Tom Tromey <tom@tromey.com>

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

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index ddee928d510..cbd37fd3094 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -768,7 +768,7 @@ proc runto { linespec args } {
     
     # the "at foo.c:36" output we get with -g.
     # the "in func" output we get without -g.
-    gdb_expect 30 {
+    gdb_expect {
 	-re "(?:Break|Temporary break).* at .*:$decimal.*$gdb_prompt $" {
 	    if { $print_pass } {
 		pass $test_name

                 reply	other threads:[~2024-04-22 16:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240422161311.0A0993860759@sourceware.org \
    --to=bauermann@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).