mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
tests: add helper for DEVICE_DELETED events
Add qemuMonitorTestEmitDeviceDeleted() so monitor tests can emit a DEVICE_DELETED event after the command reply has already been consumed. The helper uses the monitor callback path directly and avoids adding event JSON to command/reply fixtures. Signed-off-by: Akash Kulhalli <akash.kulhalli@oracle.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
1 parent
f4e362487b
commit
750ee6248b
2 files changed
+12
No files matched your search
@@ -1240,3 +1240,12 @@ qemuMonitorTestGetDomainObj(qemuMonitorTest *test)
|
||||
{
|
||||
return test->vm;
|
||||
}
|
||||
|
||||
void
|
||||
qemuMonitorTestEmitDeviceDeleted(qemuMonitorTest *test,
|
||||
const char *alias)
|
||||
{
|
||||
virObjectLock(test->mon);
|
||||
qemuMonitorEmitDeviceDeleted(test->mon, alias);
|
||||
virObjectUnlock(test->mon);
|
||||
}
|
||||
@@ -109,5 +109,8 @@ qemuAgent *
|
||||
qemuMonitorTestGetAgent(qemuMonitorTest *test);
|
||||
virDomainObj *
|
||||
qemuMonitorTestGetDomainObj(qemuMonitorTest *test);
|
||||
void
|
||||
qemuMonitorTestEmitDeviceDeleted(qemuMonitorTest *test,
|
||||
const char *alias);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorTest, qemuMonitorTestFree);
|
||||
Reference in new issue
Block a user