test-network: add a test case for PFIFOHeadDrop

This commit is contained in:
Yu Watanabe 2020-03-12 02:09:06 +09:00
parent 053a2ddbb2
commit 73136507ac
2 changed files with 16 additions and 0 deletions

View File

@ -172,3 +172,15 @@ CeilRate=0.5M
Parent=2:3a
Handle=003a
LimitSize=1M
[HierarchyTokenBucketClass]
Parent=root
ClassId=0002:003b
Priority=1
Rate=1M
CeilRate=0.5M
[PFIFOHeadDrop]
Parent=2:3b
Handle=003b
PacketLimit=1023

View File

@ -2333,6 +2333,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'qdisc bfifo 3a: parent 2:3a')
self.assertRegex(output, 'limit 1000000')
self.assertRegex(output, 'qdisc pfifo_head_drop 3b: parent 2:3b')
self.assertRegex(output, 'limit 1023p')
output = check_output('tc class show dev dummy98')
print(output)
self.assertRegex(output, 'class htb 2:30 root leaf 30:')
@ -2346,6 +2349,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'class htb 2:38 root leaf 38:')
self.assertRegex(output, 'class htb 2:39 root leaf 39:')
self.assertRegex(output, 'class htb 2:3a root leaf 3a:')
self.assertRegex(output, 'class htb 2:3b root leaf 3b:')
self.assertRegex(output, 'prio 1 rate 1Mbit ceil 500Kbit')
def test_qdisc2(self):