mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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 <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200630090351.1247703-6-armbru@redhat.com>
This commit is contained in:
parent
d8da9e71b6
commit
7b8eb7f848
7 changed files with 14 additions and 39 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue