qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>,
	Yury Kotov <yury-kotov@yandex-team.ru>,
	Richard Henderson <richard.henderson@linaro.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] tests/qtest/libqtest: Do not overwrite child coredump
Date: Tue, 7 Jul 2020 15:32:33 +0200	[thread overview]
Message-ID: <12844fd3-19f9-11e9-0572-09d17dff68e5@amsat.org> (raw)
In-Reply-To: <2e62e2a9-6fd0-fe6a-6122-2e10aab265e1@redhat.com>

On 7/7/20 11:29 AM, Paolo Bonzini wrote:
> On 07/07/20 11:03, Thomas Huth wrote:
>>> +++ b/tests/qtest/libqtest.c
>>> @@ -173,7 +173,12 @@ static void kill_qemu(QTestState *s)
>>>          fprintf(stderr, "%s:%d: kill_qemu() detected QEMU death "
>>>                  "from signal %d (%s)%s\n",
>>>                  __FILE__, __LINE__, sig, signame, dump);
>>> -        abort();
>>> +        if (WCOREDUMP(wstatus)) {
>>> +            /* Preserve child coredump */
>>> +            exit(1);
>>> +        } else {
>>> +            abort();
>>> +        }
>>>      }
>>>  }
>> Would it maybe rather make sense to always use exit(1) unconditionally here?
> 
> But why is it a problem to overwrite the child core dump?  Aren't both
> stashed away if you use the core.PID name as is common?

I'm not sure what you mean. Without this patch, the coredump I get
is qtest parent, coredumpctl list the child but the coredump is
unavailable. With this patch I don't get the uninteresting (for my
uses) qtest parent but the child coredump. I'm using Fedora 30,
I don't remember changing the coredumpctl default config. Travis-CI
is based on Ubuntu.

> 
> Paolo
> 
> 


      reply	other threads:[~2020-07-07 13:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  3:19 [PATCH] tests/qtest/libqtest: Do not overwrite child coredump Philippe Mathieu-Daudé
2020-07-07  9:03 ` Thomas Huth
2020-07-07  9:29   ` Paolo Bonzini
2020-07-07 13:32     ` Philippe Mathieu-Daudé [this message]

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=12844fd3-19f9-11e9-0572-09d17dff68e5@amsat.org \
    --to=f4bug@amsat.org \
    --cc=armbru@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=yury-kotov@yandex-team.ru \
    /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 NNTP newsgroup(s).