Re: [PATCH 12/20] qemumonitortestutils: Add instrumentation for guest agent testing

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

 



On 07/30/2013 07:05 AM, Peter Krempa wrote:
> Add helper functions to open guest agent connections and a handler for
> replying to the "guest-sync" command.
> ---
>  tests/qemumonitortestutils.c | 133 ++++++++++++++++++++++++++++++++++++++++++-
>  tests/qemumonitortestutils.h |   6 ++
>  2 files changed, 137 insertions(+), 2 deletions(-)
> 

> @@ -462,6 +535,24 @@ static qemuMonitorCallbacks qemuMonitorTestCallbacks = {
>  };
> 
> 
> +static void
> +qemuMonitorTestAgentEOFNotify(qemuAgentPtr agent ATTRIBUTE_UNUSED,
> +                              virDomainObjPtr vm ATTRIBUTE_UNUSED)
> +{
> +}
> +
> +static void
> +qemuMonitorTestAgentErrorNotify(qemuAgentPtr agent ATTRIBUTE_UNUSED,
> +                                virDomainObjPtr vm ATTRIBUTE_UNUSED)
> +{
> +}

Since these are the same impl, is it worth simplifying slightly to have:

static void
qemuMonitorTestAgentNofify(...) { }

> +
> +static qemuAgentCallbacks qemuMonitorTestAgentCallbacks = {
> +    .eofNotify = qemuMonitorTestAgentEOFNotify,
> +    .errorNotify = qemuMonitorTestAgentErrorNotify,

and have both callback pointers initialized to the same function
pointer?  But that's a minor space optimization.

>      qemuMonitorTestFree(test);
>      return NULL;
>  }
> 
> +
>  qemuMonitorPtr

Was this newline missed in your earlier patch that sanitized the
whitespace between functions?

ACK.

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]