[libvirt] [PATCH 1/2] test: Refactor setting of dummy error handlers

Eric Blake eblake at redhat.com
Tue Sep 17 14:41:37 UTC 2013


On 09/17/2013 07:40 AM, Peter Krempa wrote:
> Multiple tests need to register a function to quiesce errors from
> libvirt when using a connection and doing negative tests. Each of those
> tests had a static function to do so. This can be replaced by a utility
> function that enables the errors when debug is enabledd.

s/enabledd/enabled/

> 
> This patch adds virtTestQuiesceLibvirtErrors() and refactors test that
> use private handlers.
> ---
>  tests/esxutilstest.c | 12 +-----------
>  tests/reconnect.c    |  6 +-----
>  tests/sockettest.c   |  9 +--------
>  tests/statstest.c    |  9 +--------
>  tests/testutils.c    | 13 ++++++++++---
>  tests/testutils.h    |  2 ++
>  tests/utiltest.c     | 12 +-----------
>  7 files changed, 17 insertions(+), 46 deletions(-)

ACK.  The 1:3 +/- ratio is a sign of a good refactoring :)

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130917/0eb381c5/attachment-0001.sig>


More information about the libvir-list mailing list