public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Wait longer for core generation
Date: Thu,  1 Dec 2022 06:25:13 +0000 (GMT)	[thread overview]
Message-ID: <20221201062513.B91DA385703A@sourceware.org> (raw)

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

commit f0cb4aa909d0e3c1c656b2ba9758a59a2cde75de
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Dec 1 07:25:04 2022 +0100

    [gdb/testsuite] Wait longer for core generation
    
    When I run the gdb testsuite on a powerpc64le-linux system with (slow) nfs
    file system, I run into timeouts due to core generation, like for instance:
    ...
    (gdb) gcore $outputs/gdb.ada/task_switch_in_core/crash.gcore^M
    FAIL: gdb.ada/task_switch_in_core.exp: save a corefile (timeout)
    ...
    
    Fix this by using with_timeout_factor 3 in gdb_gcore_cmd.
    
    Tested on powerpc64le-linux.
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 gdb/testsuite/lib/gdb.exp | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 23e3cc0c2d4..f41fc1375aa 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5730,13 +5730,19 @@ proc gdb_gcore_cmd {core test} {
     global gdb_prompt
 
     set result 0
-    gdb_test_multiple "gcore $core" $test {
-	-re "Saved corefile .*\[\r\n\]+$gdb_prompt $" {
-	    pass $test
-	    set result 1
-	}
-	-re "(?:Can't create a corefile|Target does not support core file generation\\.)\[\r\n\]+$gdb_prompt $" {
-	    unsupported $test
+
+    set re_unsupported \
+	"(?:Can't create a corefile|Target does not support core file generation\\.)"
+
+    with_timeout_factor 3 {
+	gdb_test_multiple "gcore $core" $test {
+	    -re -wrap "Saved corefile .*" {
+		pass $test
+		set result 1
+	    }
+	    -re -wrap $re_unsupported {
+		unsupported $test
+	    }
 	}
     }

                 reply	other threads:[~2022-12-01  6:25 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=20221201062513.B91DA385703A@sourceware.org \
    --to=vries@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).