Re: [PATCH] tests: Fix misplaced parenthesis in qemumonitorjsontest

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

 



On 12/03/2014 02:45 PM, Martin Kletzander wrote:
> When trying clang, it found out that we were comparing sizeof with 0
> even though we wanted to check the return value of memcmp.
> 
> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
> ---
>  tests/qemumonitorjsontest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
> index 5bfcd20..d3ae29a 100644
> --- a/tests/qemumonitorjsontest.c
> +++ b/tests/qemumonitorjsontest.c
> @@ -1879,7 +1879,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
>                                            "drive-virtio-disk0", &info, false) < 0)
>          goto cleanup;
> 
> -    if (memcmp(&info, &expectedInfo, sizeof(info) != 0)) {
> +    if (memcmp(&info, &expectedInfo, sizeof(info)) != 0) {
>          virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
>                         "Invalid @info");
>          goto cleanup;
> 

The test fails after this change, because the options added by

commit d506a51aeb2a7a7b0c963f760e32b94376ea7173
    qemu: Add bps_max and friends qemu driver

aren't filled in by the above qemuMonitorJSONSetBlockIoThrottle call.

Jan

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]