public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Weimin Pan <weimin.pan@oracle.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] gdb.base/siginfo-thread.exp: Increase timeout for 'gcore' command
Date: Wed, 01 Mar 2017 03:23:00 -0000	[thread overview]
Message-ID: <1488338603-107524-1-git-send-email-weimin.pan@oracle.com> (raw)

The following failed lines from running test case siginfo-thread:

FAIL: gdb.base/siginfo-thread.exp: save a core file (timeout)
FAIL: gdb.base/siginfo-thread.exp: extract si_addr
FAIL: gdb.base/siginfo-thread.exp: p ssi_addr

indicate the testsuite timed out when gdb was instructed to write the
core file. The patch below fixes the problem by simply increasing the
timeout by a factor of 2 to give gdb more time to generate core files.

Tested in sparc64-linux-gnu. No regressions.

gdb/testsuite/ChangeLog:
2017-02-22  Weimin Pan  <weimin.pan@oracle.com>

        * gdb.base/siginfo-thread.exp: Increase timeout by a factor of 2
        for the 'gcore command.
---
 gdb/testsuite/gdb.base/siginfo-thread.exp |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/gdb/testsuite/gdb.base/siginfo-thread.exp b/gdb/testsuite/gdb.base/siginfo-thread.exp
index 825a0d2..872780b 100644
--- a/gdb/testsuite/gdb.base/siginfo-thread.exp
+++ b/gdb/testsuite/gdb.base/siginfo-thread.exp
@@ -44,15 +44,17 @@ if { ![runto_main] } then {
 gdb_test "continue" "Thread .* received signal SIGSEGV.*" "continue to signal"
 
 # Try to generate a core file, for a later test.
-set gcorefile [standard_output_file $testfile.gcore]
-set gcore_created [gdb_gcore_cmd $gcorefile "save a core file"]
-
-set ssi_addr ""
-set test "extract si_addr"
-gdb_test_multiple "p \$_siginfo" "$test" {
-    -re "si_addr = ($hex).*$gdb_prompt $" {
-	set ssi_addr $expect_out(1,string)
-	pass "$test"
+with_timeout_factor 2 {
+    set gcorefile [standard_output_file $testfile.gcore]
+    set gcore_created [gdb_gcore_cmd $gcorefile "save a core file"]
+
+    set ssi_addr ""
+    set test "extract si_addr"
+    gdb_test_multiple "p \$_siginfo" "$test" {
+    	-re "si_addr = ($hex).*$gdb_prompt $" {
+	    set ssi_addr $expect_out(1,string)
+	    pass "$test"
+    	}
     }
 }
 
-- 
1.7.1

             reply	other threads:[~2017-03-01  3:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01  3:23 Weimin Pan [this message]
2017-03-16 14:45 ` Yao Qi
2017-03-16 16:00   ` Wei-min Pan
2017-03-16 17:08     ` Pedro Alves
2017-03-16 18:27       ` Wei-min Pan
2017-03-16 18:34         ` Pedro Alves
2017-03-16 19:10           ` Wei-min Pan
2017-03-16 19:21             ` Pedro Alves
2017-03-16 19:51               ` Wei-min Pan

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=1488338603-107524-1-git-send-email-weimin.pan@oracle.com \
    --to=weimin.pan@oracle.com \
    --cc=gdb-patches@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).