9 #include "libqos/libqos.h"
10 #include "libqos/pci.h"
12 /*** Test Setup & Teardown ***/
15 * Launch QEMU with the given command line,
16 * and then set up interrupts and our guest malloc interface.
18 QOSState
*qtest_vboot(QOSOps
*ops
, const char *cmdline_fmt
, va_list ap
)
22 struct QOSState
*qs
= g_malloc(sizeof(QOSState
));
24 cmdline
= g_strdup_vprintf(cmdline_fmt
, ap
);
25 qs
->qts
= qtest_start(cmdline
);
27 qtest_irq_intercept_in(global_qtest
, "ioapic");
28 if (ops
&& ops
->init_allocator
) {
29 qs
->alloc
= ops
->init_allocator(ALLOC_NO_FLAGS
);
37 * Launch QEMU with the given command line,
38 * and then set up interrupts and our guest malloc interface.
40 QOSState
*qtest_boot(QOSOps
*ops
, const char *cmdline_fmt
, ...)
45 va_start(ap
, cmdline_fmt
);
46 qs
= qtest_vboot(ops
, cmdline_fmt
, ap
);
53 * Tear down the QEMU instance.
55 void qtest_shutdown(QOSState
*qs
)
57 if (qs
->alloc
&& qs
->ops
&& qs
->ops
->uninit_allocator
) {
58 qs
->ops
->uninit_allocator(qs
->alloc
);