diff options
Diffstat (limited to 'tests/libqos/libqos.c')
-rw-r--r-- | tests/libqos/libqos.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c index 6c9137165d..636a111a6f 100644 --- a/tests/libqos/libqos.c +++ b/tests/libqos/libqos.c @@ -24,8 +24,8 @@ QOSState *qtest_vboot(QOSOps *ops, const char *cmdline_fmt, va_list ap) qs->qts = qtest_init(cmdline); qs->ops = ops; if (ops) { - qs->alloc = ops->init_allocator(qs->qts, ALLOC_NO_FLAGS); - qs->pcibus = ops->qpci_new(qs->qts, qs->alloc); + ops->alloc_init(&qs->alloc, qs->qts, ALLOC_NO_FLAGS); + qs->pcibus = ops->qpci_new(qs->qts, &qs->alloc); } g_free(cmdline); @@ -58,11 +58,8 @@ void qtest_common_shutdown(QOSState *qs) qs->ops->qpci_free(qs->pcibus); qs->pcibus = NULL; } - if (qs->alloc && qs->ops->uninit_allocator) { - qs->ops->uninit_allocator(qs->alloc); - qs->alloc = NULL; - } } + alloc_destroy(&qs->alloc); qtest_quit(qs->qts); g_free(qs); } @@ -116,7 +113,7 @@ void migrate(QOSState *from, QOSState *to, const char *uri) /* If we were running, we can wait for an event. */ if (running) { - migrate_allocator(from->alloc, to->alloc); + migrate_allocator(&from->alloc, &to->alloc); set_context(to); qtest_qmp_eventwait(to->qts, "RESUME"); return; @@ -146,7 +143,7 @@ void migrate(QOSState *from, QOSState *to, const char *uri) g_assert_not_reached(); } - migrate_allocator(from->alloc, to->alloc); + migrate_allocator(&from->alloc, &to->alloc); set_context(to); } |