qemuxml2argvmock: Mock virNetDevSetMTU

Unfortunately the network backend commandline formatter attempts to also
setup the backend itself, which it really should not.

For now make sure qemuxml2argvtest can call virNetDevSetMTU.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2023-12-04 16:28:23 +01:00
parent 2da71d8e43
commit 1948244461
2 changed files with 9 additions and 1 deletions

View File

@ -202,7 +202,7 @@ int virNetDevSetCoalesce(const char *ifname,
int virNetDevSetMTU(const char *ifname, int virNetDevSetMTU(const char *ifname,
int mtu) int mtu)
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_NO_INLINE;
int virNetDevSetMTUFromDevice(const char *ifname, int virNetDevSetMTUFromDevice(const char *ifname,
const char *otherifname) const char *otherifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;

View File

@ -284,3 +284,11 @@ virIdentityEnsureSystemToken(void)
{ {
return g_strdup("3de80bcbf22d4833897f1638e01be9b2"); return g_strdup("3de80bcbf22d4833897f1638e01be9b2");
} }
int
virNetDevSetMTU(const char *ifname G_GNUC_UNUSED,
int mtu G_GNUC_UNUSED)
{
return 0;
}