qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4] tests/libqtest: Improve kill_qemu()


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v4] tests/libqtest: Improve kill_qemu()
Date: Wed, 15 Aug 2018 11:50:21 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 08/15/2018 10:35 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
> 
>> On 08/13/2018 02:17 AM, Markus Armbruster wrote:
>>> Eric Blake <address@hidden> writes:
>>>
>>>> On 08/10/2018 08:28 AM, Eric Blake wrote:
>>>>> Instead of using a raw assert, print the information in an
>>>>> easier to understand way:
>>>>>
>>>>> /i386/ahci/sanity: tests/libqtest.c:119: kill_qemu() detected QEMU death 
>>>>> from signal 11 (Segmentation fault) (core dumped)
>>>>
>>>> Well, it would help if my commit message actually matched...
>>>>
>>>>
>>>>> +        if (wstatus) {
>>>>> +            if (WIFEXITED(wstatus)) {
>>>>> +                fprintf(stderr, "%s:%d: kill_qemu() tried to terminate 
>>>>> QEMU "
>>>>> +                        "process but encountered exit status %d\n",
>>>>> +                        __FILE__, __LINE__, WEXITSTATUS(wstatus));
>>>>> +            } else if (WIFSIGNALED(wstatus)) {
>>>>> +                int sig = WTERMSIG(wstatus);
>>>>> +                const char *signame = strsignal(sig) ?: "unknown ???";
>>>>> +                const char *dump = WCOREDUMP(wstatus) ? " (dumped core)" 
>>>>> : "";
>>>>> +
>>>>> +                fprintf(stderr, "%s:%d: kill_qemu() detected QEMU death "
>>>>> +                        "from signal %d (%s)%s\n",
>>>>
>>>> ...the code.
>>>
>>> I got libqtest patches in my queue, and I could stick this patch in.
>>> Would you like me to touch up the commit message when I apply?  Or
>>> should I expect v5?
>>>
>>
>> If you don't mind doing the touchup (s/core dumped/dumped core/), then
>> I don't need to submit v5.
> 
> Since "core dumped" is how the shell traditionally reports this, I'd
> prefer to adjust the code to match the commit message.  Okay?
> 

Apparently your commit message betrayed you =) You are also custom to
see "core dumped" in your terminal.

I also prefer "core dumped", this is the default string I'm custom to
fgrep for, and the quoted version I expect other people to google for.

With code adjusted:
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]