Blame SOURCES/kvm-Revert-test-hbitmap-Add-non-advancing-iter_next-test.patch

7711c0
From 882e1e9983aee5f98b3ad7c65ced43d7cacfd000 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 20 Mar 2019 21:48:34 +0100
7711c0
Subject: [PATCH 041/163] Revert "test-hbitmap: Add non-advancing iter_next
7711c0
 tests"
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190320214838.22027-7-jsnow@redhat.com>
7711c0
Patchwork-id: 84999
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 06/10] Revert "test-hbitmap: Add non-advancing iter_next tests"
7711c0
Bugzilla: 1691048
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
7711c0
This reverts commit 269576848ec3d57d2d958cf5ac69b08c44adf816.
7711c0
7711c0
The functionality is unused. Drop tests.
7711c0
7711c0
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Reviewed-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit 4294c4ab4825a2ce4d816e52f95a6f08b56aa69c)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 tests/test-hbitmap.c | 36 ++++++++++++------------------------
7711c0
 1 file changed, 12 insertions(+), 24 deletions(-)
7711c0
7711c0
diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c
7711c0
index 4f312e9..6358f35 100644
7711c0
--- a/tests/test-hbitmap.c
7711c0
+++ b/tests/test-hbitmap.c
7711c0
@@ -30,18 +30,6 @@ typedef struct TestHBitmapData {
7711c0
 } TestHBitmapData;
7711c0
 
7711c0
 
7711c0
-static int64_t check_hbitmap_iter_next(HBitmapIter *hbi)
7711c0
-{
7711c0
-    int next0, next1;
7711c0
-
7711c0
-    next0 = hbitmap_iter_next(hbi, false);
7711c0
-    next1 = hbitmap_iter_next(hbi, true);
7711c0
-
7711c0
-    g_assert_cmpint(next0, ==, next1);
7711c0
-
7711c0
-    return next0;
7711c0
-}
7711c0
-
7711c0
 /* Check that the HBitmap and the shadow bitmap contain the same data,
7711c0
  * ignoring the same "first" bits.
7711c0
  */
7711c0
@@ -58,7 +46,7 @@ static void hbitmap_test_check(TestHBitmapData *data,
7711c0
 
7711c0
     i = first;
7711c0
     for (;;) {
7711c0
-        next = check_hbitmap_iter_next(&hbi;;
7711c0
+        next = hbitmap_iter_next(&hbi, true);
7711c0
         if (next < 0) {
7711c0
             next = data->size;
7711c0
         }
7711c0
@@ -447,25 +435,25 @@ static void test_hbitmap_iter_granularity(TestHBitmapData *data,
7711c0
     /* Note that hbitmap_test_check has to be invoked manually in this test.  */
7711c0
     hbitmap_test_init(data, 131072 << 7, 7);
7711c0
     hbitmap_iter_init(&hbi, data->hb, 0);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), <, 0);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0);
7711c0
 
7711c0
     hbitmap_test_set(data, ((L2 + L1 + 1) << 7) + 8, 8);
7711c0
     hbitmap_iter_init(&hbi, data->hb, 0);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), ==, (L2 + L1 + 1) << 7);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), <, 0);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, (L2 + L1 + 1) << 7);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0);
7711c0
 
7711c0
     hbitmap_iter_init(&hbi, data->hb, (L2 + L1 + 2) << 7);
7711c0
     g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0);
7711c0
 
7711c0
     hbitmap_test_set(data, (131072 << 7) - 8, 8);
7711c0
     hbitmap_iter_init(&hbi, data->hb, 0);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), ==, (L2 + L1 + 1) << 7);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), ==, 131071 << 7);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), <, 0);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, (L2 + L1 + 1) << 7);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, 131071 << 7);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0);
7711c0
 
7711c0
     hbitmap_iter_init(&hbi, data->hb, (L2 + L1 + 2) << 7);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), ==, 131071 << 7);
7711c0
-    g_assert_cmpint(check_hbitmap_iter_next(&hbi), <, 0);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), ==, 131071 << 7);
7711c0
+    g_assert_cmpint(hbitmap_iter_next(&hbi, true), <, 0);
7711c0
 }
7711c0
 
7711c0
 static void hbitmap_test_set_boundary_bits(TestHBitmapData *data, ssize_t diff)
7711c0
@@ -905,7 +893,7 @@ static void test_hbitmap_serialize_zeroes(TestHBitmapData *data,
7711c0
     for (i = 0; i < num_positions; i++) {
7711c0
         hbitmap_deserialize_zeroes(data->hb, positions[i], min_l1, true);
7711c0
         hbitmap_iter_init(&iter, data->hb, 0);
7711c0
-        next = check_hbitmap_iter_next(&iter);
7711c0
+        next = hbitmap_iter_next(&iter, true);
7711c0
         if (i == num_positions - 1) {
7711c0
             g_assert_cmpint(next, ==, -1);
7711c0
         } else {
7711c0
@@ -931,10 +919,10 @@ static void test_hbitmap_iter_and_reset(TestHBitmapData *data,
7711c0
 
7711c0
     hbitmap_iter_init(&hbi, data->hb, BITS_PER_LONG - 1);
7711c0
 
7711c0
-    check_hbitmap_iter_next(&hbi;;
7711c0
+    hbitmap_iter_next(&hbi, true);
7711c0
 
7711c0
     hbitmap_reset_all(data->hb);
7711c0
-    check_hbitmap_iter_next(&hbi;;
7711c0
+    hbitmap_iter_next(&hbi, true);
7711c0
 }
7711c0
 
7711c0
 static void test_hbitmap_next_zero_check_range(TestHBitmapData *data,
7711c0
-- 
7711c0
1.8.3.1
7711c0