From 05e520f1c7f6ac7a142c616883e00c8924e81331 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 11 Sep 2017 12:19:57 -0500 Subject: libqos: Use explicit QTestState for fw_cfg operations Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adjusting all callers. In particular, fw_cfg-test had to reorder things to create the test state prior to creating the fw_cfg (and drop a pointless strdup in the meantime), but that test now no longer depends on global_qtest. Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Thomas Huth [thuth: Fixed conflict wrt pc_alloc_init() in vhost-user-test.c] Signed-off-by: Thomas Huth --- tests/libqos/libqos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/libqos/libqos.c') diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c index 18f08cf1ba..5729a0618d 100644 --- a/tests/libqos/libqos.c +++ b/tests/libqos/libqos.c @@ -24,7 +24,7 @@ QOSState *qtest_vboot(QOSOps *ops, const char *cmdline_fmt, va_list ap) qs->qts = qtest_start(cmdline); qs->ops = ops; if (ops) { - qs->alloc = ops->init_allocator(ALLOC_NO_FLAGS); + qs->alloc = ops->init_allocator(qs->qts, ALLOC_NO_FLAGS); qs->pcibus = ops->qpci_init(qs->qts, qs->alloc); } -- cgit 1.4.1