On 11/05/2015 12:53 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> 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
signature.asc
Description: OpenPGP digital signature