mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
tests: Add support for passing driver to qemu monitor
The driver is then passed to monitor event handlers.
This commit is contained in:
parent
a950b4f91d
commit
201f01ab97
@ -242,7 +242,7 @@ testQemuHotplug(const void *data)
|
|||||||
|
|
||||||
/* Now is the best time to feed the spoofed monitor with predefined
|
/* Now is the best time to feed the spoofed monitor with predefined
|
||||||
* replies. */
|
* replies. */
|
||||||
if (!(test_mon = qemuMonitorTestNew(true, driver.xmlopt, vm)))
|
if (!(test_mon = qemuMonitorTestNew(true, driver.xmlopt, vm, &driver)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
tmp = test->mon;
|
tmp = test->mon;
|
||||||
|
@ -869,7 +869,8 @@ error:
|
|||||||
qemuMonitorTestPtr
|
qemuMonitorTestPtr
|
||||||
qemuMonitorTestNew(bool json,
|
qemuMonitorTestNew(bool json,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm,
|
||||||
|
virQEMUDriverPtr driver)
|
||||||
{
|
{
|
||||||
qemuMonitorTestPtr test = NULL;
|
qemuMonitorTestPtr test = NULL;
|
||||||
virDomainChrSourceDef src;
|
virDomainChrSourceDef src;
|
||||||
@ -882,7 +883,7 @@ qemuMonitorTestNew(bool json,
|
|||||||
&src,
|
&src,
|
||||||
json,
|
json,
|
||||||
&qemuMonitorTestCallbacks,
|
&qemuMonitorTestCallbacks,
|
||||||
NULL)))
|
driver)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
virObjectLock(test->mon);
|
virObjectLock(test->mon);
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
# define __VIR_QEMU_MONITOR_TEST_UTILS_H__
|
# define __VIR_QEMU_MONITOR_TEST_UTILS_H__
|
||||||
|
|
||||||
# include "domain_conf.h"
|
# include "domain_conf.h"
|
||||||
|
# include "qemu/qemu_conf.h"
|
||||||
# include "qemu/qemu_monitor.h"
|
# include "qemu/qemu_monitor.h"
|
||||||
# include "qemu/qemu_agent.h"
|
# include "qemu/qemu_agent.h"
|
||||||
|
|
||||||
@ -60,11 +61,12 @@ int qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
|
|||||||
ATTRIBUTE_SENTINEL;
|
ATTRIBUTE_SENTINEL;
|
||||||
|
|
||||||
# define qemuMonitorTestNewSimple(json, xmlopt) \
|
# define qemuMonitorTestNewSimple(json, xmlopt) \
|
||||||
qemuMonitorTestNew(json, xmlopt, NULL)
|
qemuMonitorTestNew(json, xmlopt, NULL, NULL)
|
||||||
|
|
||||||
qemuMonitorTestPtr qemuMonitorTestNew(bool json,
|
qemuMonitorTestPtr qemuMonitorTestNew(bool json,
|
||||||
virDomainXMLOptionPtr xmlopt,
|
virDomainXMLOptionPtr xmlopt,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm,
|
||||||
|
virQEMUDriverPtr driver);
|
||||||
|
|
||||||
qemuMonitorTestPtr qemuMonitorTestNewAgent(virDomainXMLOptionPtr xmlopt);
|
qemuMonitorTestPtr qemuMonitorTestNewAgent(virDomainXMLOptionPtr xmlopt);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user