qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] tests/libqtest: Allow to set expected exit


From: Yury Kotov
Subject: Re: [Qemu-devel] [PATCH 2/3] tests/libqtest: Allow to set expected exit status
Date: Tue, 27 Aug 2019 18:27:43 +0300

27.08.2019, 17:04, "Eric Blake" <address@hidden>:
> On 8/27/19 7:02 AM, Yury Kotov wrote:
>
> In the subject: 'Allow to $verb' is not idiomatic; either 'Allow
> $subject to $verb' or 'Allow ${verb}ing' sound better. In this case,
> I'd go with:
>
> tests/libqtest: Allow setting expected exit status
>

Ok, thanks. I'll fix it in v2

>>  Add qtest_set_expected_status function to set expected exit status of
>>  child process. By default expected exit status is 0.
>
>>  @@ -130,11 +136,12 @@ static void kill_qemu(QTestState *s)
>>        * fishy and should be logged with as much detail as possible.
>>        */
>>       wstatus = s->wstatus;
>>  - if (wstatus) {
>>  + if (WEXITSTATUS(wstatus) != s->expected_status) {
>>           if (WIFEXITED(wstatus)) {
>
> Wrong ordering. WEXITSTATUS() is not reliable unless WIFEXITED() is true.
>

Yes, it's a bug.. I'll fix it in v2

> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3226
> Virtualization: qemu.org | libvirt.org

Regards,
Yury



reply via email to

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