The driver is then passed to monitor event handlers. --- tests/qemuhotplugtest.c | 2 +- tests/qemumonitortestutils.c | 5 +++-- tests/qemumonitortestutils.h | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 088a0f1..6fa331e 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -237,7 +237,7 @@ testQemuHotplug(const void *data) /* Now is the best time to feed the spoofed monitor with predefined * replies. */ - if (!(test_mon = qemuMonitorTestNew(true, driver.xmlopt, vm))) + if (!(test_mon = qemuMonitorTestNew(true, driver.xmlopt, vm, &driver))) goto cleanup; tmp = test->mon; diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 95c1b3d..1857cfd 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -869,7 +869,8 @@ error: qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt, - virDomainObjPtr vm) + virDomainObjPtr vm, + virQEMUDriverPtr driver) { qemuMonitorTestPtr test = NULL; virDomainChrSourceDef src; @@ -882,7 +883,7 @@ qemuMonitorTestNew(bool json, &src, json, &qemuMonitorTestCallbacks, - NULL))) + driver))) goto error; virObjectLock(test->mon); diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h index ccb5457..9e39795 100644 --- a/tests/qemumonitortestutils.h +++ b/tests/qemumonitortestutils.h @@ -21,6 +21,7 @@ # define __VIR_QEMU_MONITOR_TEST_UTILS_H__ # include "domain_conf.h" +# include "qemu/qemu_conf.h" # include "qemu/qemu_monitor.h" # include "qemu/qemu_agent.h" @@ -60,11 +61,12 @@ int qemuMonitorTestAddItemParams(qemuMonitorTestPtr test, ATTRIBUTE_SENTINEL; # define qemuMonitorTestNewSimple(json, xmlopt) \ - qemuMonitorTestNew(json, xmlopt, NULL) + qemuMonitorTestNew(json, xmlopt, NULL, NULL) qemuMonitorTestPtr qemuMonitorTestNew(bool json, virDomainXMLOptionPtr xmlopt, - virDomainObjPtr vm); + virDomainObjPtr vm, + virQEMUDriverPtr driver); qemuMonitorTestPtr qemuMonitorTestNewAgent(virDomainXMLOptionPtr xmlopt); -- 1.8.3.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list