Re: [PATCH] tests/networkxml2conf: Fix to work again on non-Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2016-12-23 at 10:45 +0100, Martin Kletzander wrote:
> >     if (virAsprintf(&inxml, "%s/networkxml2confdata/%s.xml",
> >                     abs_srcdir, info->name) < 0 ||
> > -        virAsprintf(&outxml, "%s/networkxml2confdata/%s.conf",
> > -                    abs_srcdir, info->name) < 0) {
> > +        virAsprintf(&outxml, "%s/networkxml2confdata/%s-%s.conf",
> > +                    abs_srcdir, info->name, os) < 0) {
> 
> LOL, "outxml" is not XML at all.

I hadn't noticed. Nice :D

> But anyway, I'm sorry to say this, but honestly?  Gross.  I'd rather
> change except-interface=lo to except-interface=LOOPBACK_NAME and then
> strstr() and memmove() the outxml.  Just my $.02, though.

I could see that becoming an issue when more test cases are
added if enough attention is not paid during review, but I
guess the same could happen with people only adding the Linux
variant of the output file.

That said, it would achieve my goal of unbreaking the test
case on FreeBSD without adding hacks to the code being tested,
so if you feel like taking a stab at implementing it[1] I'll
be happy to review :)


[1] aka "putting your $.02 where your mouth is" :P
-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux