qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v9 04/27] qapi: Simplify error testing in test-q


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v9 04/27] qapi: Simplify error testing in test-qmp-*
Date: Thu, 5 Nov 2015 08:04:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/05/2015 12:53 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
> 
>> On 11/04/2015 01:40 AM, Markus Armbruster wrote:
>>
>>>
>>>> By moving err into data, we can let test teardown take care
>>>> of cleaning up any collected error; it also gives us fewer
>>>> lines of code between repeated tests where init runs teardown
>>>> on our behalf.
>>>
>>> This part isn't as obvious.
>>>
>>> Having two parts of differing obviousness indicates patch splitting
>>> could make sense.  Especially when the parts are large and mechanical,
>>> because reviewing large mechanical changes is much easier when there's
>>> just one kind of it.
>>
>> Will split.

> Perhaps we want something like
> 
>  * Expect an error, abort() if there is none:
>  *     error_free_or_abort(&err);
>  * This frees the error object and clears err.  Convenient for tests.

Don't know if we'd want that directly in error.h, or just in the
affected tests, but I like the idea.  All the more reason for me to
split the patch into expected error vs. expected no error cases.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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