On 07/18/2016 11:24 AM, Max Reitz wrote: > On 15.07.2016 22:27, John Snow wrote: >> From: Fam Zheng <f...@redhat.com> >> >> Acked-by: John Snow <js...@redhat.com> >> Signed-off-by: Fam Zheng <f...@redhat.com> >> Signed-off-by: John Snow <js...@redhat.com> >> --- >> 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); >