From: Cole Robinson Date: Wed, 7 Oct 2009 14:44:05 +0000 (-0400) Subject: test: Activate interfaces specified through driver config file. X-Git-Tag: v0.7.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fe128a46c35e8178990eea8ea8bcdd72ae40bbc;p=thirdparty%2Flibvirt.git test: Activate interfaces specified through driver config file. This matches the behavior of domains, storage, etc. Also, fix up some whitespace issues in the area. --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 0b866d2144..0541a7348c 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -779,13 +779,16 @@ static int testOpenFromFile(virConnectPtr conn, if (!def) goto error; } else { - if ((def = virInterfaceDefParseNode(conn, xml, ifaces[i])) == NULL) + if ((def = virInterfaceDefParseNode(conn, xml, ifaces[i])) == NULL) goto error; } + if (!(iface = virInterfaceAssignDef(conn, &privconn->ifaces, def))) { virInterfaceDefFree(def); goto error; } + + iface->active = 1; virInterfaceObjUnlock(iface); } VIR_FREE(ifaces);