Re: [PATCHv2 09/21] fix fallout in tests/

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

 



On 06.03.2013 16:37, Peter Krempa wrote:
> ---
>  tests/domainsnapshotxml2xmltest.c |  5 +++++
>  tests/lxcxml2xmltest.c            |  7 ++++++-
>  tests/qemuargv2xmltest.c          |  8 ++++++--
>  tests/qemumonitorjsontest.c       | 29 +++++++++++++++--------------
>  tests/qemumonitortestutils.c      |  4 ++--
>  tests/qemumonitortestutils.h      |  5 +++--
>  tests/qemuxml2argvtest.c          |  5 ++++-
>  tests/qemuxml2xmltest.c           |  6 +++++-
>  tests/qemuxmlnstest.c             |  5 ++++-
>  tests/testutilslxc.c              |  7 +++++++
>  tests/testutilslxc.h              |  2 ++
>  tests/testutilsqemu.c             |  3 +--
>  tests/testutilsqemu.h             |  2 ++
>  tests/testutilsxen.c              |  6 ++++++
>  tests/testutilsxen.h              |  2 ++
>  tests/xmconfigtest.c              |  8 +++++++-
>  tests/xml2sexprtest.c             |  8 +++++++-
>  tests/xml2vmxtest.c               |  8 +++++++-
>  18 files changed, 91 insertions(+), 29 deletions(-)
> 

> diff --git a/tests/testutilslxc.c b/tests/testutilslxc.c
> index 0c2170c..ea003c6 100644
> --- a/tests/testutilslxc.c
> +++ b/tests/testutilslxc.c
> @@ -15,6 +15,13 @@ static int testLXCDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED,
>  }
> 
> 
> +virDomainXMLConfPtr
> +testLXCXMLConfInit(void)
> +{
> +    return virDomainXMLConfNew(NULL, NULL);
> +}
> +
> +

Again - is it even worth creating this wrapper if we are not passing any
useful pointers there? I might be missing something though. [1]

>  virCapsPtr testLXCCapsInit(void) {
>      virCapsPtr caps;
>      virCapsGuestPtr guest;
> diff --git a/tests/testutilslxc.h b/tests/testutilslxc.h
> index ee8056f..2a1e82a 100644
> --- a/tests/testutilslxc.h
> +++ b/tests/testutilslxc.h
> @@ -1,4 +1,6 @@
> 
>  #include "capabilities.h"
> +#include "domain_conf.h"
> 
>  virCapsPtr testLXCCapsInit(void);
> +virDomainXMLConfPtr testLXCXMLConfInit(void);
> diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
> index 966527c..27cf647 100644
> --- a/tests/testutilsqemu.c
> +++ b/tests/testutilsqemu.c
> @@ -120,6 +120,7 @@ error:
>      return -1;
>  }
> 
> +
>  virCapsPtr testQemuCapsInit(void) {
>      virCapsPtr caps;
>      virCapsGuestPtr guest;
> @@ -174,8 +175,6 @@ virCapsPtr testQemuCapsInit(void) {
>          (machines = testQemuAllocMachines(&nmachines)) == NULL)
>          goto cleanup;
> 
> -    qemuDomainSetNamespaceHooks(caps);
> -
>      if ((guest = virCapabilitiesAddGuest(caps, "hvm", VIR_ARCH_I686,
>                                           "/usr/bin/qemu", NULL,
>                                           nmachines, machines)) == NULL ||
> diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h
> index 3d70a2a..932becb 100644
> --- a/tests/testutilsqemu.h
> +++ b/tests/testutilsqemu.h
> @@ -1,4 +1,6 @@
> 
>  #include "capabilities.h"
> +#include "domain_conf.h"
> 
>  virCapsPtr testQemuCapsInit(void);
> +virDomainXMLConfPtr testQemuXMLConfInit(void);
> diff --git a/tests/testutilsxen.c b/tests/testutilsxen.c
> index 6d97925..201ea2a 100644
> --- a/tests/testutilsxen.c
> +++ b/tests/testutilsxen.c
> @@ -15,6 +15,12 @@ static int testXenDefaultConsoleType(const char *ostype,
>          return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_XEN;
>  }
> 
> +virDomainXMLConfPtr
> +testXenXMLConfInit(void)
> +{
> +    return virDomainXMLConfNew(NULL, NULL);
> +}
> +

[1]: Same applies here ...

>  virCapsPtr testXenCapsInit(void) {
>      struct utsname utsname;
>      virCapsPtr caps;

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