From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48669 invoked by alias); 22 Jan 2016 16:47:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 48653 invoked by uid 89); 22 Jan 2016 16:47:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Child, Hx-languages-length:1568, sk:interru X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 22 Jan 2016 16:47:18 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 19BDD49DDC; Fri, 22 Jan 2016 16:47:17 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MGlFum016483; Fri, 22 Jan 2016 11:47:16 -0500 Message-ID: <56A25D13.2080608@redhat.com> Date: Fri, 22 Jan 2016 16:47:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix fail in gdb.base/interrupt-noterm.exp References: <1453480183-5131-1-git-send-email-yao.qi@linaro.org> In-Reply-To: <1453480183-5131-1-git-send-email-yao.qi@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00572.txt.bz2 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 > > * 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. >