public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix fail in gdb.base/interrupt-noterm.exp
@ 2016-01-22 16:29 Yao Qi
  2016-01-22 16:47 ` Pedro Alves
  0 siblings, 1 reply; 14+ messages in thread
From: Yao Qi @ 2016-01-22 16:29 UTC (permalink / raw)
  To: gdb-patches

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.

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

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

end of thread, other threads:[~2016-01-26 13:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22 16:29 [PATCH] Fix fail in gdb.base/interrupt-noterm.exp Yao Qi
2016-01-22 16:47 ` Pedro Alves
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

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