From: John Snow <jsnow@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: kwolf@redhat.com, fam@euphon.net, den@openvz.org,
qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH] tests/test-hbitmap: test next_zero and _next_dirty_area after truncate
Date: Wed, 7 Aug 2019 20:04:29 -0400 [thread overview]
Message-ID: <f7d9be28-73d8-af63-55af-4ed33e17d0cb@redhat.com> (raw)
In-Reply-To: <20190805164652.42409-1-vsementsov@virtuozzo.com>
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 <vsementsov@virtuozzo.com>
> ---
>
> 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 <jsnow@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
And staged:
Thanks, applied to my bitmaps tree:
https://github.com/jnsnow/qemu/commits/bitmaps
https://github.com/jnsnow/qemu.git
--js
next prev parent reply other threads:[~2019-08-08 0:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 16:46 [Qemu-devel] [PATCH] tests/test-hbitmap: test next_zero and _next_dirty_area after truncate Vladimir Sementsov-Ogievskiy
2019-08-05 23:09 ` no-reply
2019-08-08 0:04 ` John Snow [this message]
2019-08-09 8:26 ` Vladimir Sementsov-Ogievskiy
2019-08-12 19:40 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7d9be28-73d8-af63-55af-4ed33e17d0cb@redhat.com \
--to=jsnow@redhat.com \
--cc=den@openvz.org \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).