public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [gdb/testsuite] Wait longer for core generation
@ 2022-11-30 14:58 Tom de Vries
  2022-11-30 21:25 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2022-11-30 14:58 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

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.
---
 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
+	    }
 	}
     }
 

base-commit: 016c606c66ce4b98c220130b9046545b04254a4a
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [gdb/testsuite] Wait longer for core generation
  2022-11-30 14:58 [PATCH] [gdb/testsuite] Wait longer for core generation Tom de Vries
@ 2022-11-30 21:25 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2022-11-30 21:25 UTC (permalink / raw)
  To: Tom de Vries via Gdb-patches; +Cc: Tom de Vries, Simon Marchi

>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:

Tom> When I run the gdb testsuite on a powerpc64le-linux system with (slow) nfs
Tom> file system, I run into timeouts due to core generation, like for instance:
Tom> ...
Tom> (gdb) gcore $outputs/gdb.ada/task_switch_in_core/crash.gcore^M
Tom> FAIL: gdb.ada/task_switch_in_core.exp: save a corefile (timeout)
Tom> ...

Tom> Fix this by using with_timeout_factor 3 in gdb_gcore_cmd.

Tom> Tested on powerpc64le-linux.

This seems fine to me.

Tom

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-30 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 14:58 [PATCH] [gdb/testsuite] Wait longer for core generation Tom de Vries
2022-11-30 21:25 ` Tom Tromey

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).