提交 63a960c7 编写于 作者: I Ilias Stamatis 提交者: Michal Privoznik

test_driver: provide virDomainGetTime implementation

Implement testDomainGetTime by returning a fixed timestamp.
Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 1cdea0f9
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册