[libvirt] [PATCH 6/9] networkxml2conftest: s/lo/lo0/ on non-Linux

Roman Bogorodskiy bogorodskiy at gmail.com
Sun Jan 1 16:14:24 UTC 2017


  Michal Privoznik wrote:

> After 478ddedc12 a bug is fixed where we wrongly presumed loopack
> device name on non-Linux systems. It's lo0. However, the fix is
> not reflected in the tests which are failing now.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  tests/networkxml2conftest.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c
> index a80d3b2d4..404e2c722 100644
> --- a/tests/networkxml2conftest.c
> +++ b/tests/networkxml2conftest.c
> @@ -41,10 +41,21 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf, dnsmasqCapsPtr
>      if (dctx == NULL)
>          goto fail;
>  
> -    if (networkDnsmasqConfContents(obj, pidfile, &actual,
> -                        dctx, caps) < 0)
> +    if (networkDnsmasqConfContents(obj, pidfile, &actual, dctx, caps) < 0)
>          goto fail;
>  
> +#ifndef __linux__
> +    char * tmp;
> +
> +    if (!(tmp = virStringReplace(actual,
> +                                 "except-interface=lo0\n",
> +                                 "except-interface=lo\n")))
> +        goto fail;
> +    VIR_FREE(actual);
> +    actual = tmp;
> +    tmp = NULL;
> +#endif
> +
>      if (virTestCompareToFile(actual, outconf) < 0)
>          goto fail;

Michal, what do you think about this version of this fix:

https://www.redhat.com/archives/libvir-list/2016-December/msg01190.html

?

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170101/4422c2db/attachment-0001.sig>


More information about the libvir-list mailing list