mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: virnetdev*: remove unnecessary labels
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0846343861
commit
406a6c20a8
@ -63,7 +63,6 @@ testVirNetDevBandwidthParse(virNetDevBandwidth **var,
|
|||||||
static int
|
static int
|
||||||
testVirNetDevBandwidthSet(const void *data)
|
testVirNetDevBandwidthSet(const void *data)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
const struct testSetStruct *info = data;
|
const struct testSetStruct *info = data;
|
||||||
const char *iface = info->iface;
|
const char *iface = info->iface;
|
||||||
g_autoptr(virNetDevBandwidth) band = NULL;
|
g_autoptr(virNetDevBandwidth) band = NULL;
|
||||||
@ -80,7 +79,7 @@ testVirNetDevBandwidthSet(const void *data)
|
|||||||
virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL);
|
virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL);
|
||||||
|
|
||||||
if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true) < 0)
|
if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
if (!(actual_cmd = virBufferContentAndReset(&buf))) {
|
if (!(actual_cmd = virBufferContentAndReset(&buf))) {
|
||||||
/* This is interesting, no command has been executed.
|
/* This is interesting, no command has been executed.
|
||||||
@ -91,12 +90,10 @@ testVirNetDevBandwidthSet(const void *data)
|
|||||||
virTestDifference(stderr,
|
virTestDifference(stderr,
|
||||||
NULLSTR(info->exp_cmd),
|
NULLSTR(info->exp_cmd),
|
||||||
NULLSTR(actual_cmd));
|
NULLSTR(actual_cmd));
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -152,7 +152,6 @@ testNameEscape(const void *opaque)
|
|||||||
static int
|
static int
|
||||||
testVirNetDevOpenvswitchInterfaceSetQos(const void *data)
|
testVirNetDevOpenvswitchInterfaceSetQos(const void *data)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
const struct testSetQosStruct *info = data;
|
const struct testSetQosStruct *info = data;
|
||||||
const char *iface = info->iface;
|
const char *iface = info->iface;
|
||||||
g_autoptr(virNetDevBandwidth) band = NULL;
|
g_autoptr(virNetDevBandwidth) band = NULL;
|
||||||
@ -169,7 +168,7 @@ testVirNetDevOpenvswitchInterfaceSetQos(const void *data)
|
|||||||
virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL);
|
virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL);
|
||||||
|
|
||||||
if (virNetDevOpenvswitchInterfaceSetQos(iface, band, vm_id, true) < 0)
|
if (virNetDevOpenvswitchInterfaceSetQos(iface, band, vm_id, true) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
if (!(actual_cmd = virBufferContentAndReset(&buf))) {
|
if (!(actual_cmd = virBufferContentAndReset(&buf))) {
|
||||||
/* This is interesting, no command has been executed.
|
/* This is interesting, no command has been executed.
|
||||||
@ -180,19 +179,16 @@ testVirNetDevOpenvswitchInterfaceSetQos(const void *data)
|
|||||||
virTestDifference(stderr,
|
virTestDifference(stderr,
|
||||||
NULLSTR(info->exp_cmd),
|
NULLSTR(info->exp_cmd),
|
||||||
NULLSTR(actual_cmd));
|
NULLSTR(actual_cmd));
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
testVirNetDevOpenvswitchInterfaceClearQos(const void *data)
|
testVirNetDevOpenvswitchInterfaceClearQos(const void *data)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
const struct testClearQosStruct *info = data;
|
const struct testClearQosStruct *info = data;
|
||||||
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||||
g_autofree char *actual_cmd = NULL;
|
g_autofree char *actual_cmd = NULL;
|
||||||
@ -203,7 +199,7 @@ testVirNetDevOpenvswitchInterfaceClearQos(const void *data)
|
|||||||
virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL);
|
virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL);
|
||||||
|
|
||||||
if (virNetDevOpenvswitchInterfaceClearQos(iface, vmid) < 0)
|
if (virNetDevOpenvswitchInterfaceClearQos(iface, vmid) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
if (!(actual_cmd = virBufferContentAndReset(&buf))) {
|
if (!(actual_cmd = virBufferContentAndReset(&buf))) {
|
||||||
/* This is interesting, no command has been executed.
|
/* This is interesting, no command has been executed.
|
||||||
@ -214,12 +210,10 @@ testVirNetDevOpenvswitchInterfaceClearQos(const void *data)
|
|||||||
virTestDifference(stderr,
|
virTestDifference(stderr,
|
||||||
NULLSTR(info->exp_cmd),
|
NULLSTR(info->exp_cmd),
|
||||||
NULLSTR(actual_cmd));
|
NULLSTR(actual_cmd));
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user