aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test-replication.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test-replication.c b/tests/test-replication.c
index c8165ae954..f085d1993a 100644
--- a/tests/test-replication.c
+++ b/tests/test-replication.c
@@ -207,13 +207,17 @@ static BlockBackend *start_primary(void)
static void teardown_primary(void)
{
BlockBackend *blk;
+ AioContext *ctx;
/* remove P_ID */
blk = blk_by_name(P_ID);
assert(blk);
+ ctx = blk_get_aio_context(blk);
+ aio_context_acquire(ctx);
monitor_remove_blk(blk);
blk_unref(blk);
+ aio_context_release(ctx);
}
static void test_primary_read(void)
@@ -365,20 +369,27 @@ static void teardown_secondary(void)
{
/* only need to destroy two BBs */
BlockBackend *blk;
+ AioContext *ctx;
/* remove S_LOCAL_DISK_ID */
blk = blk_by_name(S_LOCAL_DISK_ID);
assert(blk);
+ ctx = blk_get_aio_context(blk);
+ aio_context_acquire(ctx);
monitor_remove_blk(blk);
blk_unref(blk);
+ aio_context_release(ctx);
/* remove S_ID */
blk = blk_by_name(S_ID);
assert(blk);
+ ctx = blk_get_aio_context(blk);
+ aio_context_acquire(ctx);
monitor_remove_blk(blk);
blk_unref(blk);
+ aio_context_release(ctx);
}
static void test_secondary_read(void)