From: Pedro Alves <pedro@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Running testsuite with /proc/sys/kernel/core_uses_pid set, avoiding leaving core dump files behind
Date: Thu, 08 Sep 2011 14:34:00 -0000 [thread overview]
Message-ID: <201109081515.15752.pedro@codesourcery.com> (raw)
In-Reply-To: <20110908130833.GA10013@host1.jankratochvil.net>
On Thursday 08 September 2011 14:08:33, Jan Kratochvil wrote:
> On Wed, 07 Sep 2011 18:18:38 +0200, Pedro Alves wrote:
> > I'm fixing this by making the tests look for core.PID as well.
>
> Do you have anything against using lib/gdb.exp core_find instead?
Nothing personal, no. :-) core_find is meant for a different scenario.
core_find runs a program that dumps core by itself, and such produced core
file is then used on subsequent gdb tests, as the inferior to debug.
The annota*.exp tests run a program that doesn't normally crash,
debug it normally (do some next/steps, etc., with annotations enabled),
and then force a signal on the inferior we know is not t handled
("(gdb) signal SIGTRAP"). The purpose of the test is not to generate the
core dump per se, but to check the annotations around sending a
signal that is not handled by the program. The core itself it totally
uninteresting, and is a byproduct. If you were investigating a annota*.exp
fail, you'd not need the core dump for anything.
On light of that, do you agree?
> > Anyway, I don't supposed there are any objections to this
> > patch?
>
> While I agree that leaving a bunch of "anonymous" core files is definitely bad
> the advantage of lib/gdb.exp core_find is that it keeps the intermediate files
> for later problems investigations - identifiable with names "$binfile.core".
Right, that's useful when we have tests that used the core as inferior, so
keeping it around is useful, as that way you still have the exact same
inferior handy to be able to reproduce the crash. But that's not the case of
these tests.
--
Pedro Alves
next prev parent reply other threads:[~2011-09-08 14:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 16:28 Pedro Alves
2011-09-08 14:15 ` Jan Kratochvil
2011-09-08 14:34 ` Pedro Alves [this message]
2011-09-08 14:56 ` Jan Kratochvil
2011-09-08 15:25 ` Pedro Alves
2011-09-08 19:54 ` 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=201109081515.15752.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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