[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/22] tests: add hbitmap iter test
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-devel] [PATCH 02/22] tests: add hbitmap iter test |
Date: |
Fri, 30 Sep 2016 13:53:08 +0300 |
Test that hbitmap iter is resistant to bitmap resetting.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
---
tests/test-hbitmap.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c
index 0ed918c..e24377f 100644
--- a/tests/test-hbitmap.c
+++ b/tests/test-hbitmap.c
@@ -881,6 +881,22 @@ static void hbitmap_test_add(const char *testpath,
hbitmap_test_teardown);
}
+static void test_hbitmap_iter_and_reset(TestHBitmapData *data,
+ const void *unused)
+{
+ HBitmapIter hbi;
+
+ hbitmap_test_init(data, L1 * 2, 0);
+ hbitmap_set(data->hb, 0, data->size);
+
+ hbitmap_iter_init(&hbi, data->hb, BITS_PER_LONG - 1);
+
+ hbitmap_iter_next(&hbi);
+
+ hbitmap_reset_all(data->hb);
+ hbitmap_iter_next(&hbi);
+}
+
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
@@ -938,6 +954,9 @@ int main(int argc, char **argv)
test_hbitmap_serialize_part);
hbitmap_test_add("/hbitmap/serialize/zeroes",
test_hbitmap_serialize_zeroes);
+
+ hbitmap_test_add("/hbitmap/iter/iter_and_reset",
+ test_hbitmap_iter_and_reset);
g_test_run();
return 0;
--
1.8.3.1
- [Qemu-devel] [PATCH 01/22] hbitmap: improve dirty iter, (continued)
- [Qemu-devel] [PATCH 01/22] hbitmap: improve dirty iter, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 14/22] qcow2: delete bitmaps on truncate, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 15/22] qcow2-bitmap: add autoclear bit, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 16/22] qmp: add persistent flag to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 06/22] qcow2: add dirty bitmaps extension, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 18/22] qapi: add md5 checksum of last dirty bitmap level to query-block, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 19/22] iotests: test qcow2 persistent dirty bitmap, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 10/22] block/dirty-bitmap: add bdrv_dirty_bitmap_next(), Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 03/22] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 17/22] qmp: add autoload parameter to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 02/22] tests: add hbitmap iter test,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH 13/22] qcow2-bitmap: check constraints, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 09/22] block: introduce persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 05/22] qcow2-bitmap: structs and consts, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 20/22] qcow2-dirty-bitmap: refcounts, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 04/22] block/dirty-bitmap: add deserialize_ones func, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 07/22] qcow2-bitmap: introduce auto-loading bitmaps, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps(), Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 22/22] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 12/22] qcow2-bitmap: add IN_USE flag, Vladimir Sementsov-Ogievskiy, 2016/09/30
- [Qemu-devel] [PATCH 08/22] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2016/09/30