qemuxml2argvmock: Mock qemuInterfaceBridgeConnect
Prepare for test cases which would want to call that function. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f9a4d24b24
commit
b448abd972
@ -48,7 +48,7 @@ int qemuInterfaceBridgeConnect(virDomainDef *def,
|
|||||||
virDomainNetDef *net,
|
virDomainNetDef *net,
|
||||||
int *tapfd,
|
int *tapfd,
|
||||||
size_t *tapfdSize)
|
size_t *tapfdSize)
|
||||||
ATTRIBUTE_NONNULL(2);
|
ATTRIBUTE_NONNULL(2) G_NO_INLINE;
|
||||||
|
|
||||||
int qemuInterfaceOpenVhostNet(virDomainObj *def,
|
int qemuInterfaceOpenVhostNet(virDomainObj *def,
|
||||||
virDomainNetDef *net) G_NO_INLINE;
|
virDomainNetDef *net) G_NO_INLINE;
|
||||||
|
@ -113,6 +113,23 @@ virNetDevTapCreate(char **ifname,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
qemuInterfaceBridgeConnect(virDomainDef *def G_GNUC_UNUSED,
|
||||||
|
virQEMUDriver *driver G_GNUC_UNUSED,
|
||||||
|
virDomainNetDef *net G_GNUC_UNUSED,
|
||||||
|
int *tapfd,
|
||||||
|
size_t *tapfdSize)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < *tapfdSize; i++)
|
||||||
|
tapfd[i] = STDERR_FILENO + 100 + i;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virNetDevSetMAC(const char *ifname G_GNUC_UNUSED,
|
virNetDevSetMAC(const char *ifname G_GNUC_UNUSED,
|
||||||
const virMacAddr *macaddr G_GNUC_UNUSED)
|
const virMacAddr *macaddr G_GNUC_UNUSED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user