[libvirt] [PATCH 09/24] tests: utils: Add virTestLoadFileJSON helper

Eric Blake eblake at redhat.com
Wed Jul 26 15:47:42 UTC 2017


On 07/26/2017 05:00 AM, Peter Krempa wrote:
> This new helper loads, parses and returns a JSON file from 'abs_srcdir'
> By using variable arguments for the function, it's not necessary to
> format the path separately in the test cases.
> ---
>  tests/testutils.c | 34 ++++++++++++++++++++++++++++++++++
>  tests/testutils.h |  4 ++++
>  2 files changed, 38 insertions(+)
> 
> diff --git a/tests/testutils.c b/tests/testutils.c
> index f193cdf8b..75f69e1c3 100644
> --- a/tests/testutils.c
> +++ b/tests/testutils.c
> @@ -407,6 +407,40 @@ virTestLoadFilePath(const char *p, ...)
>  }
> 
> 
> +/**
> + * virTestLoadFileJSON:
> + * @...: name components

Same comment as in 7/24: document that it must end in NULL.  With that,

Reviewed-by: Eric Blake <eblake at redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170726/b48c232b/attachment-0001.sig>


More information about the libvir-list mailing list