On 4/24/19 6:57 PM, Ilias Stamatis wrote:
Implement testDomainGetTime by returning a fixed timestamp.
Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index d5eecf4b7f..9b78c5c2ca 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1943,6 +1943,18 @@ testDomainGetState(virDomainPtr domain,
return 0;
}
+static int
+testDomainGetTime(virDomainPtr dom ATTRIBUTE_UNUSED,
+ long long *seconds,
+ unsigned int *nseconds,
+ unsigned int flags ATTRIBUTE_UNUSED)
+{
+ *seconds = 627319920;
+ *nseconds = 0;
+
+ return 0;
+}
+
#define TEST_SAVE_MAGIC "TestGuestMagic"
static int
@@ -6786,6 +6798,7 @@ static virHypervisorDriver testHypervisorDriver = {
.domainSetMemory = testDomainSetMemory, /* 0.1.4 */
.domainGetInfo = testDomainGetInfo, /* 0.1.1 */
.domainGetState = testDomainGetState, /* 0.9.2 */
+ .domainGetTime = testDomainGetTime, /* 5.3.0 */
.domainSave = testDomainSave, /* 0.3.2 */
.domainSaveFlags = testDomainSaveFlags, /* 0.9.4 */
.domainRestore = testDomainRestore, /* 0.3.2 */
Unfortunately, this missed -rc0 and therefore has to go into 5.4.0.
Sorry for delayed review. I'll keep this in a private branch and push it
once the freeze is over.
ACK
Michal