[libvirt] [PATCH v2 10/11] tests: qemu capabilites: qemu 2.7 and 2.8 on s390x

Jiri Denemark jdenemar at redhat.com
Thu Dec 15 16:35:01 UTC 2016


On Fri, Dec 09, 2016 at 14:38:39 -0500, Jason J. Herne wrote:
> From: "Collin L. Walling" <walling at linux.vnet.ibm.com>
> 
> Tests Qemu capabilities on s390x before and after the availability of
> the query-cpu-model-expansion QMP command. The host CPU is mocked to use
> the zEC12.2-base model for these tests, which has a defined set of features
> expected to be available on this model.
> 
> Signed-off-by: Collin L. Walling <walling at linux.vnet.ibm.com>
> Signed-off-by: Jason J. Herne <jjherne at linux.vnet.ibm.com>
> ---
>  tests/qemucapabilitiestest.c |  4 ++++
>  tests/testutilsqemu.c        | 39 ++++++++++++++++++++++++++++++++++++++-
>  tests/testutilsqemu.h        |  1 +
>  3 files changed, 43 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
> index 51d0cc4..1214d7c 100644
> --- a/tests/qemucapabilitiestest.c
> +++ b/tests/qemucapabilitiestest.c
> @@ -172,6 +172,10 @@ mymain(void)
>      DO_TEST("aarch64", "caps_2.6.0-gicv2");
>      DO_TEST("aarch64", "caps_2.6.0-gicv3");
>      DO_TEST("ppc64le", "caps_2.6.0");
> +    qemuTestSetHostCPU(driver.caps, cpuS390zEC12_2_base);
> +    DO_TEST("s390x", "caps_2.7.0");
> +    DO_TEST("s390x", "caps_2.8.0");
> +    qemuTestSetHostCPU(driver.caps, NULL);

Hmm, there is no code in libvirt which would set the host CPU in
virCaps, the caps->host.cpu pointer will always be NULL. We should test
that rather than mocking the host CPU here and testing scenarios which
will never happen in real world.

>      /*
>       * Run "tests/qemucapsprobe /path/to/qemu/binary >foo.replies"

The rest of this patch can just be dropped.

Jirka




More information about the libvir-list mailing list