test-network: add test for teql

This commit is contained in:
Yu Watanabe 2020-02-06 17:53:04 +09:00
parent 9b749c11e2
commit 3d55b5a9de
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,10 @@
[Match]
Name=dummy98
[Network]
IPv6AcceptRA=no
Address=10.1.2.3/16
[TrivialLinkEqualizer]
Parent=root
Id=1

View File

@ -1622,6 +1622,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
'25-qdisc-ingress-root.network',
'25-qdisc-netem-and-fqcodel.network',
'25-qdisc-tbf-and-sfq.network',
'25-qdisc-teql.network',
'25-route-ipv6-src.network',
'25-route-static.network',
'25-gateway-static.network',
@ -2286,6 +2287,17 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'limit 100 delay 50.0ms 10.0ms loss 20%')
self.assertRegex(output, 'qdisc ingress')
def test_qdisc4(self):
copy_unit_to_networkd_unit_path('25-qdisc-teql.network', '12-dummy.netdev')
check_output('modprobe sch_teql max_equalizers=2')
start_networkd()
self.wait_online(['dummy98:routable'])
output = check_output('tc qdisc show dev dummy98')
print(output)
self.assertRegex(output, 'qdisc teql1')
class NetworkdStateFileTests(unittest.TestCase, Utilities):
links = [
'dummy98',