[libvirt] [PATCH v2] test_driver: provide virDomainGetTime implementation

Peter Krempa pkrempa at redhat.com
Tue Apr 30 08:42:06 UTC 2019


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 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190430/ce0f22fe/attachment-0001.sig>


More information about the libvir-list mailing list