[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v6 09/10] tests: Add test code for hbitmap seria
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v6 09/10] tests: Add test code for hbitmap serialization |
Date: |
Mon, 18 Jul 2016 17:24:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
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
> +}
> +
> static void test_hbitmap_meta_zero(TestHBitmapData *data, const void *unused)
> {
> hbitmap_test_init_meta(data, 0, 0, 1);
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v6 04/10] block: Support meta dirty bitmap, (continued)
- [Qemu-block] [PATCH v6 04/10] block: Support meta dirty bitmap, John Snow, 2016/07/15
- [Qemu-block] [PATCH v6 05/10] block: Add two dirty bitmap getters, John Snow, 2016/07/15
- [Qemu-block] [PATCH v6 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded, John Snow, 2016/07/15
- [Qemu-block] [PATCH v6 08/10] block: BdrvDirtyBitmap serialization interface, John Snow, 2016/07/15
- [Qemu-block] [PATCH v6 07/10] hbitmap: serialization, John Snow, 2016/07/15
- [Qemu-block] [PATCH v6 10/10] block: More operations for meta dirty bitmap, John Snow, 2016/07/15
- [Qemu-block] [PATCH v6 09/10] tests: Add test code for hbitmap serialization, John Snow, 2016/07/15
- Re: [Qemu-block] [PATCH v6 09/10] tests: Add test code for hbitmap serialization,
Max Reitz <=