From 73136507ac8d8c8e50c81c8373d3ce46f4068c68 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 12 Mar 2020 02:09:06 +0900 Subject: test-network: add a test case for PFIFOHeadDrop --- test/test-network/conf/25-qdisc-clsact-and-htb.network | 12 ++++++++++++ test/test-network/systemd-networkd-tests.py | 4 ++++ 2 files changed, 16 insertions(+) (limited to 'test') diff --git a/test/test-network/conf/25-qdisc-clsact-and-htb.network b/test/test-network/conf/25-qdisc-clsact-and-htb.network index 53b5eab288..73f5f8fa20 100644 --- a/test/test-network/conf/25-qdisc-clsact-and-htb.network +++ b/test/test-network/conf/25-qdisc-clsact-and-htb.network @@ -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 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index e53695c17a..565378c1a6 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -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): -- cgit v1.2.3