[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/20] test-bdrv-drain: Don't modify the graph in coroutines
From: |
Eric Blake |
Subject: |
Re: [PATCH 05/20] test-bdrv-drain: Don't modify the graph in coroutines |
Date: |
Tue, 25 Apr 2023 15:10:57 -0500 |
User-agent: |
NeoMutt/20230407 |
On Tue, Apr 25, 2023 at 07:31:43PM +0200, Kevin Wolf wrote:
> test-bdrv-drain contains a few test cases that are run both in coroutine
> and non-coroutine context. Running the entire code including the setup
> and shutdown in coroutines is incorrect because graph modifications can
> generally not happen in coroutines.
>
> Change the test so that creating and destroying the test nodes and
> BlockBackends always happens outside of coroutine context.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> tests/unit/test-bdrv-drain.c | 112 +++++++++++++++++++++++------------
> 1 file changed, 75 insertions(+), 37 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- Re: [PATCH 04/20] block: Don't call no_coroutine_fns in qmp_block_resize(), (continued)
- [PATCH 03/20] block: bdrv/blk_co_unref() for calls in coroutine context, Kevin Wolf, 2023/04/25
- [PATCH 06/20] graph-lock: Add GRAPH_UNLOCKED(_PTR), Kevin Wolf, 2023/04/25
- [PATCH 10/20] nbd: Mark nbd_co_do_establish_connection() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/04/25
- [PATCH 05/20] test-bdrv-drain: Don't modify the graph in coroutines, Kevin Wolf, 2023/04/25
- Re: [PATCH 05/20] test-bdrv-drain: Don't modify the graph in coroutines,
Eric Blake <=
- [PATCH 07/20] graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock, Kevin Wolf, 2023/04/25
- [PATCH 15/20] block: Mark bdrv_co_debug_event() GRAPH_RDLOCK, Kevin Wolf, 2023/04/25
- [PATCH 11/20] vhdx: Take graph lock for accessing a node's parent list, Kevin Wolf, 2023/04/25
- [PATCH 13/20] block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/04/25