diff options
author | Cédric Bosdonnat <cbosdonnat@suse.com> | 2014-01-31 09:52:30 +0100 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2014-01-31 11:12:08 +0100 |
commit | d01596a0d36ebf15140f44239fe35adddcaca7ab (patch) | |
tree | 8394defb674c2594cae02f6801a76c389bbd7156 /tests/virnetdevbandwidthtest.c | |
parent | 6e5c79a1b5a8b3a23e7df7ffe58fb272aa17fbfb (diff) | |
download | libvirt-d01596a0d36ebf15140f44239fe35adddcaca7ab.tar.gz |
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
Diffstat (limited to 'tests/virnetdevbandwidthtest.c')
-rw-r--r-- | tests/virnetdevbandwidthtest.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 609deb80d1..5bcab12ae0 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -125,14 +125,14 @@ mymain(void) " <inbound average='1' peak='2' floor='3' burst='4'/>" " <outbound average='5' peak='6' burst='7'/>" "</bandwidth>"), - ("/sbin/tc qdisc del dev eth0 root\n" - "/sbin/tc qdisc del dev eth0 ingress\n" - "/sbin/tc qdisc add dev eth0 root handle 1: htb default 1\n" - "/sbin/tc class add dev eth0 parent 1: classid 1:1 htb rate 1kbps ceil 2kbps burst 4kb\n" - "/sbin/tc qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n" - "/sbin/tc filter add dev eth0 parent 1:0 protocol ip handle 1 fw flowid 1\n" - "/sbin/tc qdisc add dev eth0 ingress\n" - "/sbin/tc filter add dev eth0 parent ffff: protocol ip u32 match ip src 0.0.0.0/0 " + (TC " qdisc del dev eth0 root\n" + TC " qdisc del dev eth0 ingress\n" + TC " qdisc add dev eth0 root handle 1: htb default 1\n" + TC " class add dev eth0 parent 1: classid 1:1 htb rate 1kbps ceil 2kbps burst 4kb\n" + TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n" + TC " filter add dev eth0 parent 1:0 protocol ip handle 1 fw flowid 1\n" + TC " qdisc add dev eth0 ingress\n" + TC " filter add dev eth0 parent ffff: protocol ip u32 match ip src 0.0.0.0/0 " "police rate 5kbps burst 7kb mtu 64kb drop flowid :1\n")); return ret; |