qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 09/10] tests: Add test code for hbitmap seria


From: John Snow
Subject: Re: [Qemu-devel] [PATCH v6 09/10] tests: Add test code for hbitmap serialization
Date: Mon, 18 Jul 2016 15:45:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1


On 07/18/2016 11:24 AM, Max Reitz wrote:
> On 15.07.2016 22:27, John Snow wrote:
>> From: Fam Zheng <address@hidden>
>>
>> Acked-by: John Snow <address@hidden>
>> Signed-off-by: Fam Zheng <address@hidden>
>> Signed-off-by: John Snow <address@hidden>
>> ---
>>  tests/test-hbitmap.c | 139 
>> +++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 139 insertions(+)
>>
>> diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c
>> index e3abde1..18e8114 100644
>> --- a/tests/test-hbitmap.c
>> +++ b/tests/test-hbitmap.c
> 
> [...]
> 
>> @@ -737,6 +738,16 @@ static void test_hbitmap_meta_one(TestHBitmapData 
>> *data, const void *unused)
>>      }
>>  }
>>  
>> +static void test_hbitmap_serialize_granularity(TestHBitmapData *data,
>> +                                               const void *unused)
>> +{
>> +    int r;
>> +
>> +    hbitmap_test_init(data, L3 * 2, 3);
>> +    r = hbitmap_serialization_granularity(data->hb);
>> +    g_assert_cmpint(r, ==, BITS_PER_LONG << 3);
> 
> Won't this only work on systems where BITS_PER_LONG == 64?
> (Because hbitmap_serialization_granularity() uses a hard-coded 64.)
> 
> Rest looks good.
> 
> Max
> 

Yes, good catch.

>> +}
>> +
>>  static void test_hbitmap_meta_zero(TestHBitmapData *data, const void 
>> *unused)
>>  {
>>      hbitmap_test_init_meta(data, 0, 0, 1);
> 




reply via email to

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