Re: [PATCH] test_driver: implement virDomainGetHostname

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

 



On Fri, May 31, 2019 at 05:38:44PM +0200, Ilias Stamatis wrote:
> On Fri, May 31, 2019 at 4:31 PM Ilias Stamatis
> <stamatis.iliass@xxxxxxxxx> wrote:
> >
> > Always return "domain_name" + "host".
> >
> > Signed-off-by: Ilias Stamatis <stamatis.iliass@xxxxxxxxx>
> > ---
> >  src/test/test_driver.c | 22 ++++++++++++++++++++++
> >  1 file changed, 22 insertions(+)
> >
> > diff --git a/src/test/test_driver.c b/src/test/test_driver.c
> > index 2f58a1da95..aad7bb6036 100644
> > --- a/src/test/test_driver.c
> > +++ b/src/test/test_driver.c
> > @@ -1910,6 +1910,27 @@ static int testDomainReboot(virDomainPtr domain,
> >      return ret;
> >  }
> >
> > +static char *
> > +testDomainGetHostname(virDomainPtr domain,
> > +                      unsigned int flags)
> > +{
> > +    char *ret = NULL;
> > +    virDomainObjPtr vm = NULL;
> > +
> > +    virCheckFlags(0, NULL);
> > +
> > +    if (!(vm = testDomObjFromDomain(domain)))
> > +        goto cleanup;
> > +
> > +    if (virDomainObjCheckActive(vm) < 0)
> > +        goto cleanup;
> > +
> > +    ignore_value(virAsprintf(&ret, "%shost", domain->name));
> > +
> > + cleanup:
>
> Oops, missing "virDomainObjEndAPI(&vm);" here.

I'll squash that in before merging (after the 5.4.0 release).

Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>

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