Commit Graph

6 Commits

Author SHA1 Message Date
Ján Tomko
7b91dc3ecd Introduce vircommandpriv.h for functions used by tests
So far it's just virCommandSetDryRun.
2014-03-12 15:53:16 +01:00
Michal Privoznik
e60b36cb0d virnetdevbandwidthtest: Introduce some more tests
And while doing this, fix one error raised by coverity. With
current code, @actual_cmd is allowed to be NULL for the whole
run of testVirNetDevBandwidthSet. However, if something else
was expected, the @actal_cmd is passed to virtTestDifference
which dereference it immediately.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2014-01-31 16:52:27 +01:00
Cédric Bosdonnat
d01596a0d3 virnetdevbandwidthtest: fix hard coded /sbin/tc
On openSuse, (and possibly other distros), tc isn't located in
/sbin/tc. To get rid of that problem, use TC constant instead of hard
coded /sbin/tc in the expected string
2014-01-31 11:12:08 +01:00
Michal Privoznik
122cd16982 Revert "networkAllocateActualDevice: Set QoS for bridgeless networks too"
This reverts commit 2996e6be19
and some parts of 2636dc8c4d.

The former one tried to implement QoS setting on bridgeless networks.
However, as discussed upstream [1], the patch is far away from being
useful in even a single case. The whole idea of network QoS is to have
aggregated limits over several interfaces. This patch is doing
completely the opposite when merging two QoS settings (from the network
and the domain interface) into one which is then set at the domain
interface itself, not the network.

The latter one is the test for the previous one. Now none of them makes
sense.

1: https://www.redhat.com/archives/libvir-list/2014-January/msg01441.html

Conflicts:
	tests/virnetdevbandwidthtest.c: New test has been introduced since
    then.
2014-01-29 19:01:19 +01:00
Michal Privoznik
7bcbb53e18 virnetdevbandwidthtest: Introduce testVirNetDevBandwidthSet
The test tries to set some QoS limits and check if the commands
that are actually executed are the expected ones.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2014-01-29 18:10:29 +01:00
Michal Privoznik
2636dc8c4d tests: Introduce virnetdevbandwidthtest
The only API tested so far would be virNetDevBandwidthMinimal.
But there's more to come!

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2014-01-27 12:11:34 +01:00