qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	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 11:29:16 +0200	[thread overview]
Message-ID: <2e62e2a9-6fd0-fe6a-6122-2e10aab265e1@redhat.com> (raw)
In-Reply-To: <9a16d2d9-405c-2110-debe-c92b8dbece33@redhat.com>

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?

Paolo



  reply	other threads:[~2020-07-07  9:30 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 [this message]
2020-07-07 13:32     ` Philippe Mathieu-Daudé

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=2e62e2a9-6fd0-fe6a-6122-2e10aab265e1@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=lvivier@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).