1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-25 10:03:49 +03:00

test_driver: Implement virDomainGetMessages

Signed-off-by: Luke Yue <lukedyue@gmail.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Luke Yue 2021-07-12 19:32:15 +08:00 committed by Martin Kletzander
parent 8a7cfb10b8
commit 68095b835f

View File

@ -9353,6 +9353,26 @@ testDomainCheckpointDelete(virDomainCheckpointPtr checkpoint,
return ret; return ret;
} }
static int
testDomainGetMessages(virDomainPtr dom,
char ***msgs,
unsigned int flags)
{
virDomainObj *vm = NULL;
int rv = -1;
virCheckFlags(VIR_DOMAIN_MESSAGE_DEPRECATION |
VIR_DOMAIN_MESSAGE_TAINTING, -1);
if (!(vm = testDomObjFromDomain(dom)))
return -1;
rv = virDomainObjGetMessages(vm, msgs, flags);
virDomainObjEndAPI(&vm);
return rv;
}
/* /*
* Test driver * Test driver
*/ */
@ -9511,6 +9531,7 @@ static virHypervisorDriver testHypervisorDriver = {
.domainCheckpointLookupByName = testDomainCheckpointLookupByName, /* 5.6.0 */ .domainCheckpointLookupByName = testDomainCheckpointLookupByName, /* 5.6.0 */
.domainCheckpointGetParent = testDomainCheckpointGetParent, /* 5.6.0 */ .domainCheckpointGetParent = testDomainCheckpointGetParent, /* 5.6.0 */
.domainCheckpointDelete = testDomainCheckpointDelete, /* 5.6.0 */ .domainCheckpointDelete = testDomainCheckpointDelete, /* 5.6.0 */
.domainGetMessages = testDomainGetMessages, /* 7.6.0 */
}; };
static virNetworkDriver testNetworkDriver = { static virNetworkDriver testNetworkDriver = {