mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
test_driver: provide virDomainGetTime implementation
Implement testDomainGetTime by returning a fixed timestamp. Signed-off-by: Ilias Stamatis <stamatis.iliass@gmail.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1cdea0f929
commit
63a960c725
@ -1951,6 +1951,20 @@ testDomainGetState(virDomainPtr domain,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
testDomainGetTime(virDomainPtr dom ATTRIBUTE_UNUSED,
|
||||
long long *seconds,
|
||||
unsigned int *nseconds,
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
*seconds = 627319920;
|
||||
*nseconds = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define TEST_SAVE_MAGIC "TestGuestMagic"
|
||||
|
||||
static int
|
||||
@ -6794,6 +6808,7 @@ static virHypervisorDriver testHypervisorDriver = {
|
||||
.domainSetMemory = testDomainSetMemory, /* 0.1.4 */
|
||||
.domainGetInfo = testDomainGetInfo, /* 0.1.1 */
|
||||
.domainGetState = testDomainGetState, /* 0.9.2 */
|
||||
.domainGetTime = testDomainGetTime, /* 5.4.0 */
|
||||
.domainSave = testDomainSave, /* 0.3.2 */
|
||||
.domainSaveFlags = testDomainSaveFlags, /* 0.9.4 */
|
||||
.domainRestore = testDomainRestore, /* 0.3.2 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user