Re: [PATCH v3] util: Add a helper to check if all bits of a bitmap are clear

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

 



On 06/04/13 01:30, Eric Blake wrote:
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).

Thanks, pushed with add the case, and long with 2/3 in v1.

Osier

--
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]