public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Improve core file path detection & put cores in output dir
Date: Fri, 24 Jun 2022 11:59:39 +0100	[thread overview]
Message-ID: <54d5da69-19f9-f2e9-1260-b37465b29fa6@palves.net> (raw)
In-Reply-To: <87y1xmbdae.fsf@redhat.com>

On 2022-06-24 10:50, Andrew Burgess wrote:

>>  # Check for production of a core file and remove it!
>> -
>> -set test "cleanup core file"
>> -if { [remote_file host exists core] } {
>> -    remote_file host delete core
>> -    pass "$test (removed)"
>> -} elseif { $pid != -1 && [remote_file host exists core.$pid] } {
>> -    remote_file host delete core.$pid
>> -    pass "$test (removed)"
>> -} else {
>> -    pass "$test (not dumped)"
>> -}
>> +remove_core $pid

...

>> +
>> +# Check for production of a core file and remove it.  PID is the
>> +# inferior's pid or -1 if not known.  TEST is the test's message.
>> +
>> +proc remove_core {pid {test ""}} {
>> +    if {$test == ""} {
>> +	set test "cleanup core file"
>> +    }
>> +
>> +    set file [find_core_file $pid]
>> +    if {$file != ""} {
>> +	remote_file host delete $file
>> +	pass "$test (removed)"
>> +    } else {
>> +	pass "$test (not dumped)"
> 
> I wonder if 'not found' would be a more acurate description for this
> last pass?  With a particular core file pattern it might be that there
> is a core file, we just can't find it, right?
> 
> Otherwise, this looks good.
> 

Yeah, I had just copied from that the annota testcases (see above).
I'll make that change before pushing this.  Thanks!

  reply	other threads:[~2022-06-24 10:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 18:30 [PATCH 0/2] Include count of unexpected core files in gdb.sum summary Pedro Alves
2022-06-23 18:30 ` [PATCH 1/2] Improve core file path detection & put cores in output dir Pedro Alves
2022-06-24  9:50   ` Andrew Burgess
2022-06-24 10:59     ` Pedro Alves [this message]
2022-06-23 18:30 ` [PATCH 2/2] Include count of unexpected core files in gdb.sum summary Pedro Alves
2022-06-23 19:12   ` Pedro Alves
2022-06-23 22:09     ` John Baldwin
2022-06-24 11:13       ` Pedro Alves
2022-06-24 11:17         ` Pedro Alves
2022-06-24 10:07     ` Andrew Burgess

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=54d5da69-19f9-f2e9-1260-b37465b29fa6@palves.net \
    --to=pedro@palves.net \
    --cc=aburgess@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).