]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: add a test case for HTB
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 10 Feb 2020 10:41:39 +0000 (19:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 2 Mar 2020 06:46:28 +0000 (15:46 +0900)
test/test-network/conf/25-qdisc-teql-and-htb.network [moved from test/test-network/conf/25-qdisc-teql.network with 68% similarity]
test/test-network/systemd-networkd-tests.py

similarity index 68%
rename from test/test-network/conf/25-qdisc-teql.network
rename to test/test-network/conf/25-qdisc-teql-and-htb.network
index c8bb9034a2965bfd2d6dbf37ae544a499b52c771..d6e720132673ece9675921d06217a811468462f5 100644 (file)
@@ -6,6 +6,10 @@ IPv6AcceptRA=no
 Address=10.1.2.3/16
 
 [TrivialLinkEqualizer]
+Parent=ingress
+Id=1
+
+[HierarchyTokenBucket]
 Parent=root
 Handle=0002
-Id=1
+DefaultClass=30
index 6cc09235c60ea6501154e0c91b5cd65573ad3cb7..b1af0bc29110fa87ee425962e72b2300fdc3adb3 100755 (executable)
@@ -1626,7 +1626,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         '25-qdisc-ingress-root.network',
         '25-qdisc-netem-and-fqcodel.network',
         '25-qdisc-tbf-and-sfq.network',
-        '25-qdisc-teql.network',
+        '25-qdisc-teql-and-htb.network',
         '25-route-ipv6-src.network',
         '25-route-static.network',
         '25-route-vrf.network',
@@ -2309,7 +2309,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         self.assertRegex(output, 'qdisc ingress')
 
     def test_qdisc4(self):
-        copy_unit_to_networkd_unit_path('25-qdisc-teql.network', '12-dummy.netdev')
+        copy_unit_to_networkd_unit_path('25-qdisc-teql-and-htb.network', '12-dummy.netdev')
         check_output('modprobe sch_teql max_equalizers=2')
         start_networkd()
 
@@ -2317,7 +2317,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
 
         output = check_output('tc qdisc show dev dummy98')
         print(output)
-        self.assertRegex(output, 'qdisc teql1 2:')
+        self.assertRegex(output, 'qdisc teql1')
+        self.assertRegex(output, 'qdisc htb 2:')
+        self.assertRegex(output, r'default (0x30|30)')
 
 class NetworkdStateFileTests(unittest.TestCase, Utilities):
     links = [