summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-02-16 17:27:59 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-03-02 07:48:24 +0100
commitf2c5c1296acfaba9de1cec0a32532e425e2dfaf4 (patch)
tree5047c6c5f9ca07cd461f3b527b4efddf5e5f262e /test
parentnetwork: TC introduce sfb - Stochastic Fair Blue (diff)
downloadsystemd-f2c5c1296acfaba9de1cec0a32532e425e2dfaf4.tar.xz
systemd-f2c5c1296acfaba9de1cec0a32532e425e2dfaf4.zip
test-network: add a test case for sfb
Diffstat (limited to 'test')
-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 a6e7ed91d4..039a2ffa65 100644
--- a/test/test-network/conf/25-qdisc-clsact-and-htb.network
+++ b/test/test-network/conf/25-qdisc-clsact-and-htb.network
@@ -148,3 +148,15 @@ Handle=0038
VirtualQueues=12
DefaultVirtualQueue=10
GenericRIO=yes
+
+[HierarchyTokenBucketClass]
+Parent=root
+ClassId=0002:0039
+Priority=1
+Rate=1M
+CeilRate=0.5M
+
+[StochasticFairBlue]
+Parent=2:39
+Handle=0039
+PacketLimit=200000
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index a6b1f02467..3d26a87bae 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -2299,6 +2299,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'qdisc gred 38: parent 2:38')
self.assertRegex(output, 'vqs 12 default 10 grio')
+ self.assertRegex(output, 'qdisc sfb 39: parent 2:39')
+ self.assertRegex(output, 'limit 200000')
+
output = check_output('tc class show dev dummy98')
print(output)
self.assertRegex(output, 'class htb 2:30 root leaf 30:')
@@ -2310,6 +2313,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
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, 'class htb 2:39 root leaf 39:')
self.assertRegex(output, 'prio 1 rate 1Mbit ceil 500Kbit')
class NetworkdStateFileTests(unittest.TestCase, Utilities):