qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] tests/test-hbitmap: test next_zero and _next_di


From: John Snow
Subject: Re: [Qemu-devel] [PATCH] tests/test-hbitmap: test next_zero and _next_dirty_area after truncate
Date: Mon, 12 Aug 2019 15:40:49 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0


On 8/9/19 4:26 AM, Vladimir Sementsov-Ogievskiy wrote:
> 08.08.2019 3:04, John Snow wrote:
>>
>>
>> On 8/5/19 12:46 PM, Vladimir Sementsov-Ogievskiy wrote:
>>> Test that hbitmap_next_zero and hbitmap_next_dirty_area can find things
>>> after old bitmap end.
>>>
>>> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>>> ---
>>>
>>> It's a follow-up for
>>>
>>>      [PATCH for-4.1] util/hbitmap: update orig_size on truncate
>>>
>>>   tests/test-hbitmap.c | 22 ++++++++++++++++++++++
>>>   1 file changed, 22 insertions(+)
>>>
>>> diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c
>>> index 592d8219db..eed5d288cb 100644
>>> --- a/tests/test-hbitmap.c
>>> +++ b/tests/test-hbitmap.c
>>> @@ -1004,6 +1004,15 @@ static void test_hbitmap_next_zero_4(TestHBitmapData 
>>> *data, const void *unused)
>>>       test_hbitmap_next_zero_do(data, 4);
>>>   }
>>>   
>>> +static void test_hbitmap_next_zero_after_truncate(TestHBitmapData *data,
>>> +                                                  const void *unused)
>>> +{
>>> +    hbitmap_test_init(data, L1, 0);
>>> +    hbitmap_test_truncate_impl(data, L1 * 2);
>>> +    hbitmap_set(data->hb, 0, L1);
>>> +    test_hbitmap_next_zero_check(data, 0);
>>> +}
>>> +
>>>   static void test_hbitmap_next_dirty_area_check(TestHBitmapData *data,
>>>                                                  uint64_t offset,
>>>                                                  uint64_t count)
>>> @@ -1104,6 +1113,15 @@ static void 
>>> test_hbitmap_next_dirty_area_4(TestHBitmapData *data,
>>>       test_hbitmap_next_dirty_area_do(data, 4);
>>>   }
>>>   
>>> +static void test_hbitmap_next_dirty_area_after_truncate(TestHBitmapData 
>>> *data,
>>> +                                                        const void *unused)
>>> +{
>>> +    hbitmap_test_init(data, L1, 0);
>>> +    hbitmap_test_truncate_impl(data, L1 * 2);
>>> +    hbitmap_set(data->hb, L1 + 1, 1);
>>> +    test_hbitmap_next_dirty_area_check(data, 0, UINT64_MAX);
>>> +}
>>> +
>>>   int main(int argc, char **argv)
>>>   {
>>>       g_test_init(&argc, &argv, NULL);
>>> @@ -1169,6 +1187,8 @@ int main(int argc, char **argv)
>>>                        test_hbitmap_next_zero_0);
>>>       hbitmap_test_add("/hbitmap/next_zero/next_zero_4",
>>>                        test_hbitmap_next_zero_4);
>>> +    hbitmap_test_add("/hbitmap/next_zero/next_zero_after_truncate",
>>> +                     test_hbitmap_next_zero_after_truncate);
>>>   
>>>       hbitmap_test_add("/hbitmap/next_dirty_area/next_dirty_area_0",
>>>                        test_hbitmap_next_dirty_area_0);
>>> @@ -1176,6 +1196,8 @@ int main(int argc, char **argv)
>>>                        test_hbitmap_next_dirty_area_1);
>>>       hbitmap_test_add("/hbitmap/next_dirty_area/next_dirty_area_4",
>>>                        test_hbitmap_next_dirty_area_4);
>>> +    
>>> hbitmap_test_add("/hbitmap/next_dirty_area/next_dirty_area_after_truncate",
>>> +                     test_hbitmap_next_dirty_area_after_truncate);
>>>   
>>>       g_test_run();
>>>   
>>>
>>
>> Tested-by: John Snow <address@hidden>
>> Reviewed-by: John Snow <address@hidden>
>>
>> And staged:
>>
>> Thanks, applied to my bitmaps tree:
>>
>> https://github.com/jnsnow/qemu/commits/bitmaps
> 
> Thanks! Hmm but I don't see the patch at this link, neither 01 and 03 from
> "[Qemu-devel] [PATCH 0/3] backup fixes for 4.1?"...
> 

Made a mistake with my git-push syntax, because the local branch was
named `bitmaps-next`. Should be properly synchronized now.

(Also, as Max noted, I need to fix my rebase attempt for the sync=top
routine.)

--js





reply via email to

[Prev in Thread] Current Thread [Next in Thread]