This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix fail in gdb.base/interrupt-noterm.exp

In my testing, I see the following fail intermittently,

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


2016-01-22  Yao Qi  <>

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]