qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] tests/qtest/libqtest: Do not overwrite child coredump


From: Paolo Bonzini
Subject: Re: [PATCH] tests/qtest/libqtest: Do not overwrite child coredump
Date: Tue, 7 Jul 2020 11:29:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

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 via email to

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