On 04/05/2013 12:06 PM, Osier Yang wrote:
> ---
>  src/libvirt_private.syms |  1 +
>  src/util/virbitmap.c     | 17 +++++++++++++++++
>  src/util/virbitmap.h     |  3 +++
>  tests/virbitmaptest.c    | 33 ++++++++++++++++++++++++++++++++-
>  4 files changed, 53 insertions(+), 1 deletion(-)

ACK with one suggestion:

> +static int test8(const void *v ATTRIBUTE_UNUSED)
> +{
> +    virBitmapPtr bitmap = NULL;
> +    char data[108] = {0x00,};
> +
> +    bitmap = virBitmapNewData(data, sizeof(data));
> +    if (!bitmap)
> +        goto error;
> +
> +    if (!virBitmapIsAllClear(bitmap))
> +        goto error;

Here, it would also be handy to set a bit, then check that
virBitmapIsAllClear returns false (all the tests that you added merely
check that virBitmapIsAllClear returns true when it should).

-- 
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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to