mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
test-network: add tests for HTB settings
This commit is contained in:
parent
d9eacc1cdd
commit
2ee7e54b9e
@ -12,13 +12,19 @@ Parent=clsact
|
||||
Parent=root
|
||||
Handle=0002
|
||||
DefaultClass=30
|
||||
RateToQuantum=20
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0030
|
||||
Priority=1
|
||||
QuantumBytes=4000
|
||||
MTUBytes=1700
|
||||
OverheadBytes=100
|
||||
Rate=1M
|
||||
BufferBytes=123456
|
||||
CeilRate=0.5M
|
||||
CeilBufferBytes=123457
|
||||
|
||||
[NetworkEmulator]
|
||||
Parent=2:30
|
||||
|
@ -2407,7 +2407,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
|
||||
self.assertRegex(output, 'qdisc pfifo_fast 3c: parent 2:3c')
|
||||
|
||||
output = check_output('tc class show dev dummy98')
|
||||
output = check_output('tc -d class show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'class htb 2:30 root leaf 30:')
|
||||
self.assertRegex(output, 'class htb 2:31 root leaf 31:')
|
||||
@ -2422,7 +2422,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, 'class htb 2:3a root leaf 3a:')
|
||||
self.assertRegex(output, 'class htb 2:3b root leaf 3b:')
|
||||
self.assertRegex(output, 'class htb 2:3c root leaf 3c:')
|
||||
self.assertRegex(output, 'prio 1 rate 1Mbit ceil 500Kbit')
|
||||
self.assertRegex(output, 'prio 1 quantum 4000 rate 1Mbit overhead 100 ceil 500Kbit')
|
||||
self.assertRegex(output, 'burst 123456')
|
||||
self.assertRegex(output, 'cburst 123457')
|
||||
|
||||
def test_qdisc2(self):
|
||||
copy_unit_to_networkd_unit_path('25-qdisc-drr.network', '12-dummy.netdev',
|
||||
|
Loading…
Reference in New Issue
Block a user