From 7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 30 Jun 2020 11:03:30 +0200 Subject: tests: Use error_free_or_abort() where appropriate Replace g_assert(err != NULL); error_free(err); err = NULL; and variations thereof by error_free_or_abort(&err); Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200630090351.1247703-6-armbru@redhat.com> --- tests/test-block-iothread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/test-block-iothread.c') diff --git a/tests/test-block-iothread.c b/tests/test-block-iothread.c index a953794be2..3f866a35c6 100644 --- a/tests/test-block-iothread.c +++ b/tests/test-block-iothread.c @@ -650,8 +650,7 @@ static void test_propagate_mirror(void) blk_insert_bs(blk, src, &error_abort); bdrv_try_set_aio_context(target, ctx, &local_err); - g_assert(local_err); - error_free(local_err); + error_free_or_abort(&local_err); g_assert(blk_get_aio_context(blk) == main_ctx); g_assert(bdrv_get_aio_context(src) == main_ctx); -- cgit 1.4.1