[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 01/15] test-block-iothread: Check filter node in tes
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH 01/15] test-block-iothread: Check filter node in test_propagate_mirror |
Date: |
Thu, 23 May 2019 18:00:50 +0200 |
Just make the test cover the AioContext of the filter node as well.
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/test-block-iothread.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/test-block-iothread.c b/tests/test-block-iothread.c
index 59f692892e..e424d360c8 100644
--- a/tests/test-block-iothread.c
+++ b/tests/test-block-iothread.c
@@ -593,7 +593,7 @@ static void test_propagate_mirror(void)
IOThread *iothread = iothread_new();
AioContext *ctx = iothread_get_aio_context(iothread);
AioContext *main_ctx = qemu_get_aio_context();
- BlockDriverState *src, *target;
+ BlockDriverState *src, *target, *filter;
BlockBackend *blk;
Job *job;
Error *local_err = NULL;
@@ -610,11 +610,13 @@ static void test_propagate_mirror(void)
false, "filter_node", MIRROR_COPY_MODE_BACKGROUND,
&error_abort);
job = job_get("job0");
+ filter = bdrv_find_node("filter_node");
/* Change the AioContext of src */
bdrv_try_set_aio_context(src, ctx, &error_abort);
g_assert(bdrv_get_aio_context(src) == ctx);
g_assert(bdrv_get_aio_context(target) == ctx);
+ g_assert(bdrv_get_aio_context(filter) == ctx);
g_assert(job->aio_context == ctx);
/* Change the AioContext of target */
@@ -623,6 +625,7 @@ static void test_propagate_mirror(void)
aio_context_release(ctx);
g_assert(bdrv_get_aio_context(src) == main_ctx);
g_assert(bdrv_get_aio_context(target) == main_ctx);
+ g_assert(bdrv_get_aio_context(filter) == main_ctx);
/* With a BlockBackend on src, changing target must fail */
blk = blk_new(0, BLK_PERM_ALL);
@@ -635,6 +638,7 @@ static void test_propagate_mirror(void)
g_assert(blk_get_aio_context(blk) == main_ctx);
g_assert(bdrv_get_aio_context(src) == main_ctx);
g_assert(bdrv_get_aio_context(target) == main_ctx);
+ g_assert(bdrv_get_aio_context(filter) == main_ctx);
/* ...unless we explicitly allow it */
aio_context_acquire(ctx);
@@ -645,6 +649,7 @@ static void test_propagate_mirror(void)
g_assert(blk_get_aio_context(blk) == ctx);
g_assert(bdrv_get_aio_context(src) == ctx);
g_assert(bdrv_get_aio_context(target) == ctx);
+ g_assert(bdrv_get_aio_context(filter) == ctx);
job_cancel_sync_all();
--
2.20.1
- [Qemu-block] [PATCH 00/15] block: AioContext management, part 2, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 02/15] block: Add Error to blk_set_aio_context(), Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 09/15] block: Move node without parents to main AioContext, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 05/15] scsi-disk: Use qdev_prop_drive_iothread, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 10/15] blockdev: Use bdrv_try_set_aio_context() for monitor commands, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 06/15] block: Adjust AioContexts when attaching nodes, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 14/15] test-bdrv-drain: Use bdrv_try_set_aio_context(), Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 11/15] block: Remove wrong bdrv_set_aio_context() calls, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 12/15] virtio-scsi-test: Test attaching new overlay with iothreads, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 13/15] iotests: Attach new devices to node in non-default iothread, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 01/15] test-block-iothread: Check filter node in test_propagate_mirror,
Kevin Wolf <=
- [Qemu-block] [PATCH 15/15] block: Remove bdrv_set_aio_context(), Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 03/15] block: Add BlockBackend.ctx, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 08/15] test-block-iothread: BlockBackend AioContext across root node change, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 07/15] test-block-iothread: Test adding parent to iothread node, Kevin Wolf, 2019/05/23
- [Qemu-block] [PATCH 04/15] block: Add qdev_prop_drive_iothread property type, Kevin Wolf, 2019/05/23
- Re: [Qemu-block] [Qemu-devel] [PATCH 00/15] block: AioContext management, part 2, no-reply, 2019/05/23
- [Qemu-block] [PATCH 1.5/15] nbd-server: Call blk_set_allow_aio_context_change(), Kevin Wolf, 2019/05/24