public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Handle SIGSEGV in gdb selftests
Date: Fri, 16 Dec 2022 16:17:29 +0100	[thread overview]
Message-ID: <7fca4280-a259-9785-fdd1-ac802b886804@suse.de> (raw)
In-Reply-To: <20221215211442.2515108-1-tromey@adacore.com>

On 12/15/22 22:14, Tom Tromey via Gdb-patches wrote:
> The gdb.gdb self-tests were timing out for me.  Looking into it, the
> problem is that the version of the Boehm GC that is used by Guile on
> my machine causes a SEGV during stack probing.  This unexpected stop
> confuses the tests and causes repeated timeouts.
> 

FWIW, that's https://sourceware.org/bugzilla/show_bug.cgi?id=29325 .

Thanks,
- Tom

> This patch adapts the two failing tests.  This makes them work for me,
> and reduces the running time of gdb.gdb from 20 minutes to about 11
> seconds.
> ---
>   gdb/testsuite/gdb.gdb/python-helper.exp | 6 ++++++
>   gdb/testsuite/gdb.gdb/selftest.exp      | 6 ++++++
>   2 files changed, 12 insertions(+)
> 
> diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
> index 3585ac9f0bf..fc52929489e 100644
> --- a/gdb/testsuite/gdb.gdb/python-helper.exp
> +++ b/gdb/testsuite/gdb.gdb/python-helper.exp
> @@ -93,6 +93,12 @@ proc test_python_helper {} {
>       # here.
>       gdb_test_multiple "continue" "start inner gdb" {
>   	-i "$inferior_spawn_id"
> +	-re "received signal SIGSEGV.* in GC_.*$outer_prompt_re" {
> +	    # Some versions of the GC used by Guile cause a SEGV
> +	    # during stack probing.  Ignore this and carry on.
> +	    send_gdb "continue\n"
> +	    exp_continue
> +	}
>   	-re "\r\n$gdb_prompt $" {
>   	    pass $gdb_test_name
>   	}
> diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
> index ca1e7cffb4e..e2b9247f65d 100644
> --- a/gdb/testsuite/gdb.gdb/selftest.exp
> +++ b/gdb/testsuite/gdb.gdb/selftest.exp
> @@ -75,6 +75,12 @@ proc test_with_self { } {
>   	set test "xgdb is at prompt"
>   	gdb_test_multiple "continue" $test {
>   	    -i "$inferior_spawn_id"
> +	    -re "received signal SIGSEGV.* in GC_.*$gdb_prompt" {
> +		# Some versions of the GC used by Guile cause a SEGV
> +		# during stack probing.  Ignore this and carry on.
> +		send_gdb "continue\n"
> +		exp_continue
> +	    }
>   	    -re "$banner" {
>   		pass $test
>   	    }

  reply	other threads:[~2022-12-16 15:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 21:14 Tom Tromey
2022-12-16 15:17 ` Tom de Vries [this message]
2022-12-16 16:11   ` Tom Tromey
2022-12-26  8:02     ` tdevries
2023-01-14  1:11       ` Simon Marchi
2023-01-14  1:19         ` Simon Marchi
2023-01-17 16:20           ` Tom Tromey
2023-01-17 16:22             ` Simon Marchi

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=7fca4280-a259-9785-fdd1-ac802b886804@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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).