Add the config object to the MigrateCommon structure and allocate/free it in the wrappers that are used when dispatched every migration test.
Signed-off-by: Fabiano Rosas <[email protected]> --- tests/qtest/migration/framework.h | 2 ++ tests/qtest/migration/migration-util.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h index bf3492a59e..65c656e0d3 100644 --- a/tests/qtest/migration/framework.h +++ b/tests/qtest/migration/framework.h @@ -151,6 +151,8 @@ typedef struct { * used for the deferred migrate_incoming call. */ bool incoming_defer; + + QDict *config; } MigrateStart; typedef enum PostcopyRecoveryFailStage { diff --git a/tests/qtest/migration/migration-util.c b/tests/qtest/migration/migration-util.c index c2462306a1..416dd10ef8 100644 --- a/tests/qtest/migration/migration-util.c +++ b/tests/qtest/migration/migration-util.c @@ -243,6 +243,7 @@ static void migration_test_destroy(gpointer data) { MigrationTest *test = (MigrationTest *)data; + qdict_unref(test->data->start.config); g_free(test->data); g_free(test->name); g_free(test); @@ -253,6 +254,7 @@ static void migration_test_wrapper(const void *data) MigrationTest *test = (MigrationTest *)data; test->data = g_new0(MigrateCommon, 1); + test->data->start.config = qdict_new(); g_test_message("Running /%s%s", qtest_get_arch(), test->name); test->func(test->name, test->data); -- 2.51.0
