[libvirt] [PATCH 1/5] util: bitmap: Modify virBitmapSubtract to virBitmapIntersect

Andrea Bolognani abologna at redhat.com
Thu Jul 20 11:05:43 UTC 2017


On Wed, 2017-07-12 at 15:44 +0200, Peter Krempa wrote:
> Since virBitmapSubtract is unused modify it to perform bitmap
> intersection.

Normally I would ask you to remove the old function in
one patch and introduce the new one in another, but I
can see you manage to reduce the test suite churn by
squeezing both changes together, so I'm okay with it :)

> diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
> index e5305d022..882c71544 100644
> --- a/tests/virbitmaptest.c
> +++ b/tests/virbitmaptest.c
> @@ -589,7 +589,7 @@ test11(const void *opaque)
>          virBitmapParse(data->res, &resmap, 256) < 0)
>          goto cleanup;
> 
> -    virBitmapSubtract(amap, bmap);
> +    virBitmapIntersect(amap, bmap);
> 
>      if (!virBitmapEqual(amap, resmap)) {
>          fprintf(stderr, "\n bitmap subtraction failed: '%s'-'%s'!='%s'\n",

You'll want to update the error message as well.


Reviewed-by: Andrea Bolognani <abologna at redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list