[libvirt] [PATCH 10/20] qemumonitortestutils: Refactor the test helpers to allow reuse

Eric Blake eblake at redhat.com
Tue Jul 30 16:14:47 UTC 2013


On 07/30/2013 07:05 AM, Peter Krempa wrote:
> Refactor the test helpers to allow adding callbacks to verify the
> monitor responses instead of simple command name checking and clean up
> various parts to prepare for adding guest agent tests.
> ---
>  tests/qemumonitortestutils.c | 220 ++++++++++++++++++++++++-------------------
>  1 file changed, 121 insertions(+), 99 deletions(-)
> 

> @@ -512,7 +534,7 @@ qemuMonitorCommonTestInit(qemuMonitorTestPtr test)
>          goto error;
> 
>      if (virNetSocketAddIOCallback(test->client,
> -                                  VIR_EVENT_HANDLE_WRITABLE,
> +                                  test->outgoingLength > 0 ? VIR_EVENT_HANDLE_WRITABLE : VIR_EVENT_HANDLE_READABLE,

Long line.

Quite a bit of code, but looks like a reasonable refactor.  ACK.

-- 
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/20130730/f1d91b5a/attachment-0001.sig>


More information about the libvir-list mailing list