mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03: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 */
|
||||
|
||||
/* Don't forget to update networkxml2conftest :-) */
|
||||
virBufferAsprintf(&configbuf,
|
||||
"##WARNING: THIS IS AN AUTO-GENERATED FILE. "
|
||||
"CHANGES TO IT ARE LIKELY TO BE\n"
|
||||
|
@ -41,10 +41,22 @@ 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;
|
||||
|
||||
/* 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)
|
||||
goto fail;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user