[libvirt] [PATCH 5/7] tests: Add tests fr virtio-rng backend builtin

Peter Krempa pkrempa at redhat.com
Mon Jan 6 10:18:32 UTC 2020


On Wed, Jan 01, 2020 at 13:06:35 +0800, Han Han wrote:
> Signed-off-by: Han Han <hhan at redhat.com>
> ---
>  .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml  |  1 +
>  .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml  |  1 +
>  .../qemu_4.2.0-virt.aarch64.xml               |  1 +
>  tests/domaincapsdata/qemu_4.2.0.aarch64.xml   |  1 +
>  tests/domaincapsdata/qemu_4.2.0.ppc64.xml     |  1 +
>  tests/domaincapsdata/qemu_4.2.0.s390x.xml     |  1 +
>  tests/domaincapsdata/qemu_4.2.0.x86_64.xml    |  1 +
>  .../caps_4.2.0.aarch64.xml                    |  1 +
>  .../qemucapabilitiesdata/caps_4.2.0.ppc64.xml |  1 +
>  .../qemucapabilitiesdata/caps_4.2.0.s390x.xml |  1 +
>  .../caps_4.2.0.x86_64.xml                     |  1 +
>  .../qemuxml2argvdata/virtio-rng-builtin.args  | 30 ++++++++++++++++++
>  tests/qemuxml2argvdata/virtio-rng-builtin.xml | 26 ++++++++++++++++
>  tests/qemuxml2argvtest.c                      |  3 ++
>  .../qemuxml2xmloutdata/virtio-rng-builtin.xml | 31 +++++++++++++++++++
>  tests/qemuxml2xmltest.c                       |  2 ++

You definitely will need to split out the capabilities changes and they
will need to be part of the commit which actually adds the capability
detection. Otherwise some of the previous commits will fail to pass the
testsuite.


>  16 files changed, 103 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/virtio-rng-builtin.args
>  create mode 100644 tests/qemuxml2argvdata/virtio-rng-builtin.xml
>  create mode 100644 tests/qemuxml2xmloutdata/virtio-rng-builtin.xml

[...]

> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index bfbed5c3..e3579b2e 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -2119,6 +2119,9 @@ mymain(void)
>      DO_TEST("virtio-rng-egd",
>              QEMU_CAPS_DEVICE_VIRTIO_RNG,
>              QEMU_CAPS_OBJECT_RNG_EGD);
> +    DO_TEST("virtio-rng-builtin",
> +            QEMU_CAPS_DEVICE_VIRTIO_RNG,
> +            QEMU_CAPS_OBJECT_RNG_BUILTIN);

Please use DO_TEST_CAPS_LATEST instead.

>      DO_TEST_CAPS_VER("virtio-rng-egd-unix", "2.5.0");
>      DO_TEST_CAPS_LATEST("virtio-rng-egd-unix");
>      DO_TEST("virtio-rng-multiple",

[...]

> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
> index 34c2ec8c..a18682e3 100644
> --- a/tests/qemuxml2xmltest.c
> +++ b/tests/qemuxml2xmltest.c
> @@ -629,6 +629,8 @@ mymain(void)
>              QEMU_CAPS_DEVICE_VIRTIO_RNG);
>      DO_TEST("virtio-rng-egd",
>              QEMU_CAPS_DEVICE_VIRTIO_RNG);
> +    DO_TEST("virtio-rng-builtin",
> +            QEMU_CAPS_DEVICE_VIRTIO_RNG);

Same here.




More information about the libvir-list mailing list