From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25438 invoked by alias); 25 Oct 2012 06:13:20 -0000 Received: (qmail 25429 invoked by uid 22791); 25 Oct 2012 06:13:19 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Oct 2012 06:13:08 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9P6D6em002586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 25 Oct 2012 02:13:06 -0400 Received: from host2.jankratochvil.net (ovpn-116-77.ams2.redhat.com [10.36.116.77]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9P6D2Vk009802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 25 Oct 2012 02:13:05 -0400 Date: Thu, 25 Oct 2012 06:13:00 -0000 From: Jan Kratochvil To: Andrew Burgess Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH] improve python finish breakpoint for exceptions/longjmp case. Message-ID: <20121025061301.GA29065@host2.jankratochvil.net> References: <505C805A.1050400@broadcom.com> <20121011163241.GA9620@host2.jankratochvil.net> <507C7498.7040001@broadcom.com> <20121017162748.GA6546@host2.jankratochvil.net> <5088540F.3040200@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5088540F.3040200@broadcom.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-10/txt/msg00489.txt.bz2 On Wed, 24 Oct 2012 22:48:15 +0200, Andrew Burgess wrote: > On 17/10/2012 5:27 PM, Jan Kratochvil wrote: > > Also testcases should not remain hanging indefinitely if something breaks, in > > this case 'alarm (60);' at the start of 'main' should ensure that I think. > > I'm confused why this test would need to take care of shutting itself down, > if the test failed would dejagnu not timeout the test, and eventually gdb > would exit taking down the inferior as it does? For exampe if GDB crashes the inferior process is left running. > I had a look for other tests that used alarm() but there are only a few and I > didn't think any of these were trying to perform a defensive shutdown as you're > suggesting, so can you point at any other test that needs to do this sort of > thing, or is there something special about this test? This is a general problem of the GDB testsuite, this is why Fedora uses http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-orphanripper.c wrapper for running the testsuite to kill any leftover running processes. Otherwise if you do some 'make check &>file' it will hang forever as a single leftover process will still have its STDOUT/STDERR open blocking the finish. If the whole GDB testsuite was written properly this 'orphanripper' wrapper was not needed. Currently FSF GDB does not carry this 'orphanripper' wrapper, for FSF GDB there are possibilities: (1) FSF GDB could adopt this 'orphanripper' wrapper. It is not the right solution but it works. (2) Someone could review all the testsuite/*/*.c (and even *.exp) files and protect them properly. This is easy work so it should be doable despite the number of files. (3) We could switch to non-dejagnu testsuite capable of tracking spawned processes on its own (even if GDB crashes). But I am not aware of any such testsuite framework so it would be a custom tool which is equivalent to (1). Thanks, Jan