[libvirt] [PATCH 3/8] tests: Move data directories into testQemuData

Peter Krempa pkrempa at redhat.com
Wed Mar 13 08:41:31 UTC 2019


On Thu, Mar 07, 2019 at 16:44:32 +0100, Andrea Bolognani wrote:
> This removes a little duplication right away, and more
> importantly will allow us to perform some interesting
> refactoring later on.
> 
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
>  tests/qemucapabilitiestest.c | 15 +++++++++------
>  tests/qemucaps2xmltest.c     | 13 +++++++++----
>  2 files changed, 18 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
> index 0f875f9e24..e3c6681dd4 100644
> --- a/tests/qemucapabilitiestest.c
> +++ b/tests/qemucapabilitiestest.c

[...]

> @@ -47,6 +48,8 @@ testQemuDataInit(testQemuDataPtr data)
>      if (qemuTestDriverInit(&data->driver) < 0)
>          return -1;
>  
> +    data->dataDir = abs_srcdir "/qemucapabilitiesdata";
> +

I'm not entirely persuaded that you need to pass this constant in via
the data structure. Even after the last patch the value is never
modified. Could you please elaborate on the refactorings that this will
allow?

Same applies for the other data structure modified in this patch.
-------------- 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/20190313/12acd625/attachment-0001.sig>


More information about the libvir-list mailing list