Re: [PATCH v2] test_driver: provide virDomainGetTime implementation

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

 



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.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)
+{

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@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