]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
test-bdrv-drain: Use bdrv_try_set_aio_context()
authorKevin Wolf <kwolf@redhat.com>
Tue, 7 May 2019 16:22:10 +0000 (18:22 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 4 Jun 2019 14:55:58 +0000 (16:55 +0200)
No reason to use the unchecked version in tests, even more so when these
are the last callers of bdrv_set_aio_context() outside of block.c.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/test-bdrv-drain.c

index 44e658bde0c21840fc532d58c9392025be586ba3..12e2ecf517d7ad326c8a25d41a49909758b19d4f 100644 (file)
@@ -1509,16 +1509,16 @@ static void test_set_aio_context(void)
                               &error_abort);
 
     bdrv_drained_begin(bs);
-    bdrv_set_aio_context(bs, ctx_a);
+    bdrv_try_set_aio_context(bs, ctx_a, &error_abort);
 
     aio_context_acquire(ctx_a);
     bdrv_drained_end(bs);
 
     bdrv_drained_begin(bs);
-    bdrv_set_aio_context(bs, ctx_b);
+    bdrv_try_set_aio_context(bs, ctx_b, &error_abort);
     aio_context_release(ctx_a);
     aio_context_acquire(ctx_b);
-    bdrv_set_aio_context(bs, qemu_get_aio_context());
+    bdrv_try_set_aio_context(bs, qemu_get_aio_context(), &error_abort);
     aio_context_release(ctx_b);
     bdrv_drained_end(bs);