[libvirt] [PATCH 15/21] tests: qemuxml2argv: remove full testInfo initialization

Andrea Bolognani abologna at redhat.com
Tue Mar 19 14:12:46 UTC 2019


On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote:
[...]
> +# define DO_TEST_CAPS_INTERNAL(_name, _suffix, \
>                                 arch, capsfile, stripmachinealiases, ...) \
>      do { \
>          static struct testInfo info = { \
> -            name, "." suffix, NULL, NULL, -1, 0, 0, \
> +            .name = _name, \
> +            .suffix = "." _suffix, \
>          }; \

It would probably have been a lot better to perform this kind of
conversion early in the series, and then gradually get rid of the
initialization for single members at the same time as support for
the corresponding ARG_* was implemented... But I'm not gonna ask
you to go back and do that :)

Note that we're also effectively changing the default value for
migrateFd from -1 to 0, but doing so doesn't cause any failures
since the value is only used when migrateFrom is "stdio", and in
all test cases where that is true we also already set migrateFd
explicitly.

Reviewed-by: Andrea Bolognani <abologna at redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list