Re: [PATCH] test_driver: provide virDomainGetTime implementation

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

 



On Mon, Apr 08, 2019 at 01:43:17AM +0200, Ilias Stamatis wrote:
Implement testDomainGetTime by returning the current time.

Signed-off-by: Ilias Stamatis <stamatis.iliass@xxxxxxxxx>
---
I initially implemented this using clock_gettime, but Pavel suggested
that this might not be a good idea since it isn't a cross-platform
function. So I used virTimeMillisNow instead and set the nanoseconds
part to 0 which can be ok for the test driver.


Do you have a consumer for this?

IIUC these APIs are used for testing by higher layers like virt-manager
or libvirt-dbus and having it return a different value every time does
not seem that useful. For example for nodeCPUstats we return hardcoded
values.

src/test/test_driver.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)


Code-wise the patch looks good.

Jano

Attachment: signature.asc
Description: PGP signature

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