From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix fail in gdb.base/interrupt-noterm.exp
Date: Fri, 22 Jan 2016 16:47:00 -0000 [thread overview]
Message-ID: <56A25D13.2080608@redhat.com> (raw)
In-Reply-To: <1453480183-5131-1-git-send-email-yao.qi@linaro.org>
On 01/22/2016 04:29 PM, Yao Qi wrote:
> Hi,
> In my testing, I see the following fail intermittently,
>
> interrupt
> (gdb) PASS: gdb.base/interrupt-noterm.exp: interrupt
> [Inferior 1 (process 13407) exited normally]
>
> Child exited with status 0
> FAIL: gdb.base/interrupt-noterm.exp: inferior received SIGINT (timeout)
>
> because the interrupt packet may be sent to GDBserver before the SIGIO
> handler is installed. The fix in this patch is to let GDB wait
> for 500 ms between "continue &" and "interrupt" to make sure
> SIGIO handler is installed already in GDBserver side.
Can you expand the rationale some more?
E.g., why is this not a gdbserver bug? Instintively I'd say it is.
Thanks,
Pedro Alves
>
> gdb/testsuite:
>
> 2016-01-22 Yao Qi <yao.qi@linaro.org>
>
> * gdb.base/interrupt-noterm.exp: Add "after 500".
> ---
> gdb/testsuite/gdb.base/interrupt-noterm.exp | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gdb/testsuite/gdb.base/interrupt-noterm.exp b/gdb/testsuite/gdb.base/interrupt-noterm.exp
> index 05f6076..9b5bb17 100644
> --- a/gdb/testsuite/gdb.base/interrupt-noterm.exp
> +++ b/gdb/testsuite/gdb.base/interrupt-noterm.exp
> @@ -55,6 +55,9 @@ if { $async_supported < 0 } {
> return 1
> }
>
> +# Wait a while so that GDBserver's SIGIO handler is in place.
> +after 500
> +
> # With native debugging, and no terminal (emulated by interactive-mode
> # off, above), GDB had a bug where "interrupt" would send SIGINT to
> # its own process group, instead of the inferior's.
>
next prev parent reply other threads:[~2016-01-22 16:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 16:29 Yao Qi
2016-01-22 16:47 ` Pedro Alves [this message]
2016-01-22 17:14 ` Yao Qi
2016-01-22 17:35 ` Pedro Alves
2016-01-22 18:30 ` Pedro Alves
2016-01-25 9:30 ` Yao Qi
2016-01-25 10:43 ` Pedro Alves
2016-01-26 9:59 ` [PATCH 0/2 V2] Fix a " Yao Qi
2016-01-26 9:59 ` [PATCH 2/2] [GDBserver] Block and unblock SIGIO Yao Qi
2016-01-26 12:01 ` Pedro Alves
2016-01-26 13:55 ` Yao Qi
2016-01-26 9:59 ` [PATCH 1/2] [GDBserver] Check input interrupt after reading in a packet Yao Qi
2016-01-26 11:42 ` Pedro Alves
2016-01-26 13:53 ` Yao Qi
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=56A25D13.2080608@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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