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