Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed][PATCH] [gdb/testsuite] Fix another timeout in gdb.base/bg-execution-repeat.exp
Date: Wed, 23 Apr 2025 19:13:10 +0200	[thread overview]
Message-ID: <2f6d2dab-4381-4ed6-8572-6f56b8bbf789@suse.de> (raw)
In-Reply-To: <20250410030929.15869-1-tdevries@suse.de>

On 4/10/25 05:09, Tom de Vries wrote:
> With a gdb 16.2 based package, I ran into:
> ...
> (gdb) PASS: gdb.base/bg-execution-repeat.exp: c 1&: input still accepted
> interrupt
> (gdb) PASS: gdb.base/bg-execution-repeat.exp: c 1&: interrupt
> set var do_wait=0
> (gdb) PASS: gdb.base/bg-execution-repeat.exp: c 1&: set var do_wait=0
> continue&
> Cannot execute this command while the selected thread is running.
> (gdb)
> Program received signal SIGINT, Interrupt.
> PASS: gdb.base/bg-execution-repeat.exp: c 1&: continue&
> 0x00007ffff7cf1503 in clock_nanosleep@GLIBC_2.2.5 () from /lib64/libc.so.6
> FAIL: gdb.base/bg-execution-repeat.exp: c 1&: breakpoint hit 2 (timeout)
> ...
> 
> Fix this by waiting for "Program received signal SIGINT, Interrupt" after
> issuing the interrupt command.
> 

I've pushed this.

Thanks,
- Tom

> Tested on x86_64-linux.
> ---
>   gdb/testsuite/gdb.base/bg-execution-repeat.exp | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/gdb/testsuite/gdb.base/bg-execution-repeat.exp b/gdb/testsuite/gdb.base/bg-execution-repeat.exp
> index b1496ee7d5a..d5580fb8e34 100644
> --- a/gdb/testsuite/gdb.base/bg-execution-repeat.exp
> +++ b/gdb/testsuite/gdb.base/bg-execution-repeat.exp
> @@ -67,6 +67,17 @@ proc test {continue_cmd} {
>       # enable the "set var" command with an interrupt / continue& pair.
>       gdb_test -no-prompt-anchor "interrupt"
>   
> +    set test "interrupt received"
> +    set re [string_to_regexp "Program received signal SIGINT, Interrupt."]
> +    gdb_expect {
> +	-re $re {
> +	    pass $test
> +	}
> +	timeout {
> +	    fail "$test (timeout)"
> +	}
> +    }
> +
>       # Allow the breakpoint to trigger.
>       gdb_test -no-prompt-anchor "set var do_wait=0"
>   
> 
> base-commit: 6fe4e5bd10b996428a557e036c07c5839a8e0a49


      reply	other threads:[~2025-04-23 17:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10  3:09 [PATCH] " Tom de Vries
2025-04-23 17:13 ` Tom de Vries [this message]

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=2f6d2dab-4381-4ed6-8572-6f56b8bbf789@suse.de \
    --to=tdevries@suse.de \
    --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