summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-03-11 18:09:06 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-03-12 07:38:15 +0100
commit73136507ac8d8c8e50c81c8373d3ce46f4068c68 (patch)
treeb2ee4353eb3439f0759a8bf7894e96d5a3229fcc /test
parentnetwork: TC - introduce pfifo_head_drop (diff)
downloadsystemd-73136507ac8d8c8e50c81c8373d3ce46f4068c68.tar.xz
systemd-73136507ac8d8c8e50c81c8373d3ce46f4068c68.zip
test-network: add a test case for PFIFOHeadDrop
Diffstat (limited to '')
-rw-r--r--test/test-network/conf/25-qdisc-clsact-and-htb.network12
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py4
2 files changed, 16 insertions, 0 deletions
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):