1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

test-network: add a test case for DRR

This commit is contained in:
Yu Watanabe 2020-03-12 00:58:25 +09:00
parent ad365c5de7
commit 557fa421ff
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,15 @@
[Match]
Name=dummy98
[Network]
IPv6AcceptRA=no
Address=10.1.2.3/16
[DeficitRoundRobinScheduler]
Parent=root
Handle=0002
[DeficitRoundRobinSchedulerClass]
Parent=root
ClassId=0002:0030
Quantum=2000

View File

@ -1647,6 +1647,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
'25-nexthop.network',
'25-qdisc-cake.network',
'25-qdisc-clsact-and-htb.network',
'25-qdisc-drr.network',
'25-qdisc-ingress-netem-compat.network',
'25-qdisc-pie.network',
'25-route-ipv6-src.network',
@ -2343,6 +2344,19 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'class htb 2:39 root leaf 39:')
self.assertRegex(output, 'prio 1 rate 1Mbit ceil 500Kbit')
def test_qdisc2(self):
copy_unit_to_networkd_unit_path('25-qdisc-drr.network', '12-dummy.netdev')
start_networkd()
self.wait_online(['dummy98:routable'])
output = check_output('tc qdisc show dev dummy98')
print(output)
self.assertRegex(output, 'qdisc drr 2: root')
output = check_output('tc class show dev dummy98')
print(output)
self.assertRegex(output, 'class drr 2:30 root quantum 2000b')
@expectedFailureIfCAKEIsNotAvailable()
def test_qdisc_cake(self):
copy_unit_to_networkd_unit_path('25-qdisc-cake.network', '12-dummy.netdev')