On 4/30/19 10:42 AM, Peter Krempa wrote:
On Mon, Apr 29, 2019 at 17:13:35 +0200, Michal Privoznik wrote:
On 4/24/19 6:57 PM, Ilias Stamatis wrote:
Implement testDomainGetTime by returning a fixed timestamp.

Signed-off-by: Ilias Stamatis <stamatis.ili...@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)
+{

Missing 'virCheckFlags'.

+    *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.

Please ammend the patch with the above.


Yep, I've noticed that too and fixed already in the local branch of mine. Forgot to send an e-mail though.

Regrets,
Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to