summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-12-12 16:29:23 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-12-12 17:26:31 +0900
commit0baddbd5eef0bee7a290e294d7b7d25c1838d307 (patch)
tree2bf4023a039a35bd04f7baa489a574b4ed3cca2c
parent7234b915963cb7204111deaf02b6b4cc1461033f (diff)
downloadsystemd-0baddbd5eef0bee7a290e294d7b7d25c1838d307.tar.gz
test-network: add a test case for FQ
-rw-r--r--test/test-network/conf/25-qdisc-fq.network10
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py12
2 files changed, 22 insertions, 0 deletions
diff --git a/test/test-network/conf/25-qdisc-fq.network b/test/test-network/conf/25-qdisc-fq.network
new file mode 100644
index 0000000000..10e0e5b859
--- /dev/null
+++ b/test/test-network/conf/25-qdisc-fq.network
@@ -0,0 +1,10 @@
+[Match]
+Name=dummy98
+
+[Network]
+IPv6AcceptRA=no
+Address=10.1.2.3/16
+
+[TrafficControlQueueingDiscipline]
+Parent=root
+FairQueueTrafficPolicingPacketLimit=1000
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index a72b9abf76..31ffba9dda 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -1509,6 +1509,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
'25-neighbor-ip-dummy.network',
'25-neighbor-ip.network',
'25-nexthop.network',
+ '25-qdisc-fq.network',
'25-qdisc-netem-and-fqcodel.network',
'25-qdisc-tbf-and-sfq.network',
'25-route-ipv6-src.network',
@@ -2102,6 +2103,17 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertRegex(output, 'qdisc sfq')
self.assertRegex(output, 'perturb 5sec')
+ def test_qdisc2(self):
+ copy_unit_to_networkd_unit_path('25-qdisc-fq.network', '12-dummy.netdev')
+ start_networkd()
+
+ self.wait_online(['dummy98:routable'])
+
+ output = check_output('tc qdisc show dev dummy98')
+ print(output)
+ self.assertRegex(output, 'qdisc fq')
+ self.assertRegex(output, 'limit 1000p')
+
class NetworkdStateFileTests(unittest.TestCase, Utilities):
links = [
'dummy98',