[libvirt] [PATCH] tests: qemuxml2argv: Make tests based on DO_TEST_CAPS_INTERNAL stable

Peter Krempa pkrempa at redhat.com
Mon Jun 4 13:41:51 UTC 2018


On Mon, Jun 04, 2018 at 15:33:03 +0200, Peter Krempa wrote:
> To avoid problems with test cases specifying an alias machine type which
> would change once capabilities for a newer version are added strip all
> alias machine types for the DO_TEST_CAPS_INTERNAL based tests.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c                            | 17 +++++++++++++++++
>  src/qemu/qemu_capspriv.h                                |  3 +++
>  .../disk-virtio-scsi-reservations.x86_64-latest.args    |  2 +-
>  tests/qemuxml2argvdata/genid-auto.x86_64-latest.args    |  2 +-
>  tests/qemuxml2argvdata/genid.x86_64-latest.args         |  2 +-
>  tests/qemuxml2argvtest.c                                |  1 +
>  6 files changed, 24 insertions(+), 3 deletions(-)

[...]

> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 61c7ae59aa..ab7a50817a 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -705,6 +705,7 @@ mymain(void)
>          if (!(info.qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(arch), \
>                                                              capsfile))) \
>              return EXIT_FAILURE; \
> +        virQEMUCapsStripMachineAliases(info.qemuCaps); \

Actually, this should be done only for the _LATEST tests and not all
based on a specific version.

v2 comming soon.
-------------- 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/20180604/488aa26e/attachment-0001.sig>


More information about the libvir-list mailing list