summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-02-17 01:09:05 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-03-02 15:48:24 +0900
commit95edcf3fac97145aab29b5529446d74127331d9e (patch)
tree7db866aa9cd4bc977a387189aadb008e488c94ac /test
parent609e8340bbe603053e39eae6a629a39e6ca9cc68 (diff)
downloadsystemd-95edcf3fac97145aab29b5529446d74127331d9e.tar.gz
test-network: add a test case for GRED
Diffstat (limited to 'test')
-rw-r--r--test/test-network/conf/25-qdisc-clsact-and-htb.network14
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py4
2 files changed, 18 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 8d145028ff..a6e7ed91d4 100644
--- a/test/test-network/conf/25-qdisc-clsact-and-htb.network
+++ b/test/test-network/conf/25-qdisc-clsact-and-htb.network
@@ -134,3 +134,17 @@ CeilRate=0.5M
Parent=2:37
Handle=0037
PacketLimit=100000
+
+[HierarchyTokenBucketClass]
+Parent=root
+ClassId=0002:0038
+Priority=1
+Rate=1M
+CeilRate=0.5M
+
+[GenericRandomEarlyDetection]
+Parent=2:38
+Handle=0038
+VirtualQueues=12
+DefaultVirtualQueue=10
+GenericRIO=yes
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index db606e96ab..a6b1f02467 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -2296,6 +2296,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'qdisc pfifo 37: parent 2:37')
self.assertRegex(output, 'limit 100000p')
+ self.assertRegex(output, 'qdisc gred 38: parent 2:38')
+ self.assertRegex(output, 'vqs 12 default 10 grio')
+
output = check_output('tc class show dev dummy98')
print(output)
self.assertRegex(output, 'class htb 2:30 root leaf 30:')
@@ -2306,6 +2309,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'class htb 2:35 root leaf 35:')
self.assertRegex(output, 'class htb 2:36 root leaf 36:')
self.assertRegex(output, 'class htb 2:37 root leaf 37:')
+ self.assertRegex(output, 'class htb 2:38 root leaf 38:')
self.assertRegex(output, 'prio 1 rate 1Mbit ceil 500Kbit')
class NetworkdStateFileTests(unittest.TestCase, Utilities):