mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
networkxml2conftest: s/lo/lo0/ on non-Linux
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@redhat.com>
This commit is contained in:
parent
70b0a8e542
commit
a6f05c5a81
@ -1065,6 +1065,8 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* create dnsmasq config file appropriate for this network */
|
/* create dnsmasq config file appropriate for this network */
|
||||||
|
|
||||||
|
/* Don't forget to update networkxml2conftest :-) */
|
||||||
virBufferAsprintf(&configbuf,
|
virBufferAsprintf(&configbuf,
|
||||||
"##WARNING: THIS IS AN AUTO-GENERATED FILE. "
|
"##WARNING: THIS IS AN AUTO-GENERATED FILE. "
|
||||||
"CHANGES TO IT ARE LIKELY TO BE\n"
|
"CHANGES TO IT ARE LIKELY TO BE\n"
|
||||||
|
@ -41,10 +41,22 @@ testCompareXMLToConfFiles(const char *inxml, const char *outconf, dnsmasqCapsPtr
|
|||||||
if (dctx == NULL)
|
if (dctx == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (networkDnsmasqConfContents(obj, pidfile, &actual,
|
if (networkDnsmasqConfContents(obj, pidfile, &actual, dctx, caps) < 0)
|
||||||
dctx, caps) < 0)
|
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
/* Any changes to this function ^^ should be reflected here too. */
|
||||||
|
#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)
|
if (virTestCompareToFile(actual, outconf) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user