Re: [PATCH v2] test_driver: provide virDomainGetTime implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/24/19 6:57 PM, Ilias Stamatis wrote:
Implement testDomainGetTime by returning a fixed timestamp.

Signed-off-by: Ilias Stamatis <stamatis.iliass@xxxxxxxxx>
---
  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

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux