[libvirt] [PATCH] domaincapstest: Run cleanly on systems missing OVMF firmware

Martin Kletzander mkletzan at redhat.com
Wed Sep 17 15:40:57 UTC 2014


On Wed, Sep 17, 2014 at 05:32:03PM +0200, Michal Privoznik wrote:
>As of f05b6a918e28 the test produces the list of paths that can
>be passed to <loader/> and libvirt knows about them. However,
>during the process of generating the list the paths are checked
>for their presence. This may produce different results on
>different systems.  Therefore, the path - if missing - is
>added to pretend it's there.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> tests/domaincapstest.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
>diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
>index 8543963..067ad4d 100644
>--- a/tests/domaincapstest.c
>+++ b/tests/domaincapstest.c
>@@ -118,6 +118,17 @@ fillQemuCaps(virDomainCapsPtr domCaps,
>                              VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT,
>                              VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM,
>                              VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO);
>+
>+    /* Moreover, as of f05b6a918e28 we are expecting to see
>+     * OVMF_CODE.fd file which may not exists everywhere. */
>+    if (!domCaps->os.loader.values.nvalues) {
>+        virDomainCapsLoaderPtr loader = &domCaps->os.loader;
>+
>+        if (fillStringValues(&loader->values,
>+                             "/usr/share/OVMF/OVMF_CODE.fd",
>+                             NULL) < 0)
>+            return -1;
>+    }
>     return 0;
> }
> #endif /* WITH_QEMU */
>--
>1.8.5.5
>

ACK, build-breaker (at least for me).

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140917/bf05de1a/attachment-0001.sig>


More information about the libvir-list mailing list