Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Andrew Burgess <aburgess@broadcom.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] improve python finish breakpoint for exceptions/longjmp case.
Date: Thu, 25 Oct 2012 06:13:00 -0000	[thread overview]
Message-ID: <20121025061301.GA29065@host2.jankratochvil.net> (raw)
In-Reply-To: <5088540F.3040200@broadcom.com>

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


  reply	other threads:[~2012-10-25  6:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 14:58 Andrew Burgess
2012-09-24 10:22 ` Kevin Pouget
2012-10-01 16:33   ` Andrew Burgess
2012-10-01 16:30 ` Andrew Burgess
2012-10-10 21:08   ` Andrew Burgess
2012-10-11  6:46     ` Phil Muldoon
2012-10-11 16:32 ` Jan Kratochvil
2012-10-15 20:40   ` Andrew Burgess
2012-10-17 16:28     ` Jan Kratochvil
2012-10-24 20:48       ` Andrew Burgess
2012-10-25  6:13         ` Jan Kratochvil [this message]
2012-10-25 19:23       ` Andrew Burgess
2012-10-30 17:41         ` Jan Kratochvil
2012-11-06 14:24           ` Andrew Burgess
2012-11-22 18:15             ` Jan Kratochvil

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=20121025061301.GA29065@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=aburgess@broadcom.com \
    --cc=gdb-patches@sourceware.org \
    /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