mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
test-network: split test_qdisc() and test_qdisc2()
And check module availability in each tests. This also sorts qdisc tests.
This commit is contained in:
parent
854f989958
commit
4c7d13f4b2
@ -1,204 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[QDisc]
|
||||
Parent=clsact
|
||||
|
||||
[HierarchyTokenBucket]
|
||||
Parent=root
|
||||
Handle=0002
|
||||
DefaultClass=30
|
||||
RateToQuantum=20
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0030
|
||||
Priority=1
|
||||
QuantumBytes=4000
|
||||
MTUBytes=1700
|
||||
OverheadBytes=100
|
||||
Rate=1M
|
||||
BufferBytes=123456
|
||||
CeilRate=0.5M
|
||||
CeilBufferBytes=123457
|
||||
|
||||
[NetworkEmulator]
|
||||
Parent=2:30
|
||||
Handle=0030
|
||||
DelaySec=50ms
|
||||
DelayJitterSec=10ms
|
||||
LossRate=20%
|
||||
PacketLimit=100
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0031
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[TrivialLinkEqualizer]
|
||||
Parent=2:31
|
||||
Handle=0031
|
||||
Id=1
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0032
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[FairQueueing]
|
||||
Parent=2:32
|
||||
Handle=0032
|
||||
PacketLimit=1000
|
||||
FlowLimit=200
|
||||
QuantumBytes=1500
|
||||
InitialQuantumBytes=13000
|
||||
MaximumRate=1M
|
||||
Buckets=512
|
||||
OrphanMask=511
|
||||
Pacing=yes
|
||||
CEThresholdSec=100ms
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0033
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[ControlledDelay]
|
||||
Parent=2:33
|
||||
Handle=0033
|
||||
PacketLimit=2000
|
||||
TargetSec=10ms
|
||||
IntervalSec=50ms
|
||||
ECN=yes
|
||||
CEThresholdSec=100ms
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0034
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[FairQueueingControlledDelay]
|
||||
Parent=2:34
|
||||
Handle=0034
|
||||
PacketLimit=20480
|
||||
MemoryLimitBytes=64M
|
||||
Flows=2048
|
||||
TargetSec=10ms
|
||||
IntervalSec=200ms
|
||||
QuantumBytes=1400
|
||||
ECN=yes
|
||||
CEThresholdSec=100ms
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0035
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[TokenBucketFilter]
|
||||
Parent=2:35
|
||||
Handle=0035
|
||||
Rate=1G
|
||||
BurstBytes=5000
|
||||
LatencySec=70msec
|
||||
PeakRate=100G
|
||||
MTUBytes=1000000
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0036
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[StochasticFairnessQueueing]
|
||||
Parent=2:36
|
||||
Handle=0036
|
||||
PerturbPeriodSec=5sec
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0037
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[PFIFO]
|
||||
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
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0039
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[StochasticFairBlue]
|
||||
Parent=2:39
|
||||
Handle=0039
|
||||
PacketLimit=200000
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:003a
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[BFIFO]
|
||||
Parent=2:3a
|
||||
Handle=003a
|
||||
LimitBytes=1000000
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:003b
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[PFIFOHeadDrop]
|
||||
Parent=2:3b
|
||||
Handle=003b
|
||||
PacketLimit=1023
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:003c
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[PFIFOFast]
|
||||
Parent=2:3c
|
||||
Handle=003c
|
10
test/test-network/conf/25-qdisc-clsact.network
Normal file
10
test/test-network/conf/25-qdisc-clsact.network
Normal file
@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[QDisc]
|
||||
Parent=clsact
|
16
test/test-network/conf/25-qdisc-codel.network
Normal file
16
test/test-network/conf/25-qdisc-codel.network
Normal file
@ -0,0 +1,16 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[ControlledDelay]
|
||||
Parent=root
|
||||
Handle=0033
|
||||
PacketLimit=2000
|
||||
TargetSec=10ms
|
||||
IntervalSec=50ms
|
||||
ECN=yes
|
||||
CEThresholdSec=100ms
|
20
test/test-network/conf/25-qdisc-fq.network
Normal file
20
test/test-network/conf/25-qdisc-fq.network
Normal file
@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[FairQueueing]
|
||||
Parent=root
|
||||
Handle=0032
|
||||
PacketLimit=1000
|
||||
FlowLimit=200
|
||||
QuantumBytes=1500
|
||||
InitialQuantumBytes=13000
|
||||
MaximumRate=1M
|
||||
Buckets=512
|
||||
OrphanMask=511
|
||||
Pacing=yes
|
||||
CEThresholdSec=100ms
|
19
test/test-network/conf/25-qdisc-fq_codel.network
Normal file
19
test/test-network/conf/25-qdisc-fq_codel.network
Normal file
@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[FairQueueingControlledDelay]
|
||||
Parent=root
|
||||
Handle=0034
|
||||
PacketLimit=20480
|
||||
MemoryLimitBytes=64M
|
||||
Flows=2048
|
||||
TargetSec=10ms
|
||||
IntervalSec=200ms
|
||||
QuantumBytes=1400
|
||||
ECN=yes
|
||||
CEThresholdSec=100ms
|
14
test/test-network/conf/25-qdisc-gred.network
Normal file
14
test/test-network/conf/25-qdisc-gred.network
Normal file
@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[GenericRandomEarlyDetection]
|
||||
Parent=root
|
||||
Handle=0038
|
||||
VirtualQueues=12
|
||||
DefaultVirtualQueue=10
|
||||
GenericRIO=yes
|
65
test/test-network/conf/25-qdisc-htb-fifo.network
Normal file
65
test/test-network/conf/25-qdisc-htb-fifo.network
Normal file
@ -0,0 +1,65 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[HierarchyTokenBucket]
|
||||
Parent=root
|
||||
Handle=0002
|
||||
DefaultClass=30
|
||||
RateToQuantum=20
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:0037
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
QuantumBytes=4000
|
||||
MTUBytes=1700
|
||||
OverheadBytes=100
|
||||
BufferBytes=123456
|
||||
CeilBufferBytes=123457
|
||||
|
||||
[PFIFO]
|
||||
Parent=2:37
|
||||
Handle=0037
|
||||
PacketLimit=100000
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:003a
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[BFIFO]
|
||||
Parent=2:3a
|
||||
Handle=003a
|
||||
LimitBytes=1000000
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:003b
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[PFIFOHeadDrop]
|
||||
Parent=2:3b
|
||||
Handle=003b
|
||||
PacketLimit=1023
|
||||
|
||||
[HierarchyTokenBucketClass]
|
||||
Parent=root
|
||||
ClassId=0002:003c
|
||||
Priority=1
|
||||
Rate=1M
|
||||
CeilRate=0.5M
|
||||
|
||||
[PFIFOFast]
|
||||
Parent=2:3c
|
||||
Handle=003c
|
10
test/test-network/conf/25-qdisc-ingress.network
Normal file
10
test/test-network/conf/25-qdisc-ingress.network
Normal file
@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=test1
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.4/16
|
||||
|
||||
[QDisc]
|
||||
Parent=ingress
|
@ -12,6 +12,3 @@ NetworkEmulatorDelaySec=50ms
|
||||
NetworkEmulatorDelayJitterSec=10ms
|
||||
NetworkEmulatorLossRate=20%
|
||||
NetworkEmulatorPacketLimit=100
|
||||
|
||||
[TrafficControlQueueingDiscipline]
|
||||
Parent=ingress
|
15
test/test-network/conf/25-qdisc-netem.network
Normal file
15
test/test-network/conf/25-qdisc-netem.network
Normal file
@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[NetworkEmulator]
|
||||
Parent=root
|
||||
Handle=0030
|
||||
DelaySec=50ms
|
||||
DelayJitterSec=10ms
|
||||
LossRate=20%
|
||||
PacketLimit=100
|
@ -1,10 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=test1
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.4/16
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[QuickFairQueueing]
|
||||
Parent=root
|
||||
|
12
test/test-network/conf/25-qdisc-sfb.network
Normal file
12
test/test-network/conf/25-qdisc-sfb.network
Normal file
@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[StochasticFairBlue]
|
||||
Parent=root
|
||||
Handle=0039
|
||||
PacketLimit=200000
|
12
test/test-network/conf/25-qdisc-sfq.network
Normal file
12
test/test-network/conf/25-qdisc-sfq.network
Normal file
@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[StochasticFairnessQueueing]
|
||||
Parent=root
|
||||
Handle=0036
|
||||
PerturbPeriodSec=5sec
|
16
test/test-network/conf/25-qdisc-tbf.network
Normal file
16
test/test-network/conf/25-qdisc-tbf.network
Normal file
@ -0,0 +1,16 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[TokenBucketFilter]
|
||||
Parent=root
|
||||
Handle=0035
|
||||
Rate=1G
|
||||
BurstBytes=5000
|
||||
LatencySec=70msec
|
||||
PeakRate=100G
|
||||
MTUBytes=1000000
|
12
test/test-network/conf/25-qdisc-teql.network
Normal file
12
test/test-network/conf/25-qdisc-teql.network
Normal file
@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
Address=10.1.2.3/16
|
||||
|
||||
[TrivialLinkEqualizer]
|
||||
Parent=root
|
||||
Handle=0031
|
||||
Id=1
|
@ -3220,108 +3220,6 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
print(output)
|
||||
self.assertEqual(output, '')
|
||||
|
||||
def test_qdisc(self):
|
||||
copy_network_unit('25-qdisc-clsact-and-htb.network', '12-dummy.netdev',
|
||||
'25-qdisc-ingress-netem-compat.network', '11-dummy.netdev')
|
||||
check_output('modprobe sch_teql max_equalizers=2')
|
||||
start_networkd()
|
||||
self.wait_online(['dummy98:routable', 'test1:routable'])
|
||||
|
||||
output = check_output('tc qdisc show dev test1')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc netem')
|
||||
self.assertRegex(output, 'limit 100 delay 50(.0)?ms 10(.0)?ms loss 20%')
|
||||
self.assertRegex(output, 'qdisc ingress')
|
||||
|
||||
output = check_output('tc qdisc show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc clsact')
|
||||
|
||||
self.assertRegex(output, 'qdisc htb 2: root')
|
||||
self.assertRegex(output, r'default (0x30|30)')
|
||||
|
||||
self.assertRegex(output, 'qdisc netem 30: parent 2:30')
|
||||
self.assertRegex(output, 'limit 100 delay 50(.0)?ms 10(.0)?ms loss 20%')
|
||||
self.assertRegex(output, 'qdisc fq_codel')
|
||||
self.assertRegex(output, 'limit 20480p flows 2048 quantum 1400 target 10(.0)?ms ce_threshold 100(.0)?ms interval 200(.0)?ms memory_limit 64Mb ecn')
|
||||
|
||||
self.assertRegex(output, 'qdisc teql1 31: parent 2:31')
|
||||
|
||||
self.assertRegex(output, 'qdisc fq 32: parent 2:32')
|
||||
self.assertRegex(output, 'limit 1000p flow_limit 200p buckets 512 orphan_mask 511')
|
||||
self.assertRegex(output, 'quantum 1500')
|
||||
self.assertRegex(output, 'initial_quantum 13000')
|
||||
self.assertRegex(output, 'maxrate 1Mbit')
|
||||
|
||||
self.assertRegex(output, 'qdisc codel 33: parent 2:33')
|
||||
self.assertRegex(output, 'limit 2000p target 10(.0)?ms ce_threshold 100(.0)?ms interval 50(.0)?ms ecn')
|
||||
|
||||
self.assertRegex(output, 'qdisc fq_codel 34: parent 2:34')
|
||||
self.assertRegex(output, 'limit 20480p flows 2048 quantum 1400 target 10(.0)?ms ce_threshold 100(.0)?ms interval 200(.0)?ms memory_limit 64Mb ecn')
|
||||
|
||||
self.assertRegex(output, 'qdisc tbf 35: parent 2:35')
|
||||
self.assertRegex(output, 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms')
|
||||
|
||||
self.assertRegex(output, 'qdisc sfq 36: parent 2:36')
|
||||
self.assertRegex(output, 'perturb 5sec')
|
||||
|
||||
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')
|
||||
|
||||
self.assertRegex(output, 'qdisc sfb 39: parent 2:39')
|
||||
self.assertRegex(output, 'limit 200000')
|
||||
|
||||
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')
|
||||
|
||||
self.assertRegex(output, 'qdisc pfifo_fast 3c: parent 2:3c')
|
||||
|
||||
output = check_output('tc -d class show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'class htb 2:30 root leaf 30:')
|
||||
self.assertRegex(output, 'class htb 2:31 root leaf 31:')
|
||||
self.assertRegex(output, 'class htb 2:32 root leaf 32:')
|
||||
self.assertRegex(output, 'class htb 2:33 root leaf 33:')
|
||||
self.assertRegex(output, 'class htb 2:34 root leaf 34:')
|
||||
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, '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, 'class htb 2:3c root leaf 3c:')
|
||||
self.assertRegex(output, 'prio 1 quantum 4000 rate 1Mbit overhead 100 ceil 500Kbit')
|
||||
self.assertRegex(output, 'burst 123456')
|
||||
self.assertRegex(output, 'cburst 123457')
|
||||
|
||||
def test_qdisc2(self):
|
||||
copy_network_unit('25-qdisc-drr.network', '12-dummy.netdev',
|
||||
'25-qdisc-qfq.network', '11-dummy.netdev')
|
||||
start_networkd()
|
||||
self.wait_online(['dummy98:routable', 'test1:routable'])
|
||||
|
||||
output = check_output('tc qdisc show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc drr 2: root')
|
||||
output = check_output('tc class show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'class drr 2:30 root quantum 2000b')
|
||||
|
||||
output = check_output('tc qdisc show dev test1')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc qfq 2: root')
|
||||
output = check_output('tc class show dev test1')
|
||||
print(output)
|
||||
self.assertRegex(output, 'class qfq 2:30 root weight 2 maxpkt 16000')
|
||||
self.assertRegex(output, 'class qfq 2:31 root weight 10 maxpkt 8000')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_cake')
|
||||
def test_qdisc_cake(self):
|
||||
copy_network_unit('25-qdisc-cake.network', '12-dummy.netdev')
|
||||
@ -3344,27 +3242,29 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
self.assertIn('mpu 20', output)
|
||||
self.assertIn('fwmark 0xff00', output)
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_pie')
|
||||
def test_qdisc_pie(self):
|
||||
copy_network_unit('25-qdisc-pie.network', '12-dummy.netdev')
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_codel')
|
||||
def test_qdisc_codel(self):
|
||||
copy_network_unit('25-qdisc-codel.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 pie 3a: root')
|
||||
self.assertRegex(output, 'limit 200000')
|
||||
self.assertRegex(output, 'qdisc codel 33: root')
|
||||
self.assertRegex(output, 'limit 2000p target 10(.0)?ms ce_threshold 100(.0)?ms interval 50(.0)?ms ecn')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_hhf')
|
||||
def test_qdisc_hhf(self):
|
||||
copy_network_unit('25-qdisc-hhf.network', '12-dummy.netdev')
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_drr')
|
||||
def test_qdisc_drr(self):
|
||||
copy_network_unit('25-qdisc-drr.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 hhf 3a: root')
|
||||
self.assertRegex(output, 'limit 1022p')
|
||||
self.assertRegex(output, 'qdisc drr 2: root')
|
||||
output = check_output('tc class show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'class drr 2:30 root quantum 2000b')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_ets')
|
||||
def test_qdisc_ets(self):
|
||||
@ -3380,6 +3280,31 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, 'quanta 1 2 3 4 5')
|
||||
self.assertRegex(output, 'priomap 3 4 5 6 7')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_fq')
|
||||
def test_qdisc_fq(self):
|
||||
copy_network_unit('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 32: root')
|
||||
self.assertRegex(output, 'limit 1000p flow_limit 200p buckets 512 orphan_mask 511')
|
||||
self.assertRegex(output, 'quantum 1500')
|
||||
self.assertRegex(output, 'initial_quantum 13000')
|
||||
self.assertRegex(output, 'maxrate 1Mbit')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_fq_codel')
|
||||
def test_qdisc_fq_codel(self):
|
||||
copy_network_unit('25-qdisc-fq_codel.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_codel 34: root')
|
||||
self.assertRegex(output, 'limit 20480p flows 2048 quantum 1400 target 10(.0)?ms ce_threshold 100(.0)?ms interval 200(.0)?ms memory_limit 64Mb ecn')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_fq_pie')
|
||||
def test_qdisc_fq_pie(self):
|
||||
copy_network_unit('25-qdisc-fq_pie.network', '12-dummy.netdev')
|
||||
@ -3392,6 +3317,164 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, 'qdisc fq_pie 3a: root')
|
||||
self.assertRegex(output, 'limit 200000p')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_gred')
|
||||
def test_qdisc_gred(self):
|
||||
copy_network_unit('25-qdisc-gred.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 gred 38: root')
|
||||
self.assertRegex(output, 'vqs 12 default 10 grio')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_hhf')
|
||||
def test_qdisc_hhf(self):
|
||||
copy_network_unit('25-qdisc-hhf.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 hhf 3a: root')
|
||||
self.assertRegex(output, 'limit 1022p')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_htb')
|
||||
def test_qdisc_htb_fifo(self):
|
||||
copy_network_unit('25-qdisc-htb-fifo.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 htb 2: root')
|
||||
self.assertRegex(output, r'default (0x30|30)')
|
||||
|
||||
self.assertRegex(output, 'qdisc pfifo 37: parent 2:37')
|
||||
self.assertRegex(output, 'limit 100000p')
|
||||
|
||||
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')
|
||||
|
||||
self.assertRegex(output, 'qdisc pfifo_fast 3c: parent 2:3c')
|
||||
|
||||
output = check_output('tc -d class show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'class htb 2:37 root leaf 37:')
|
||||
self.assertRegex(output, 'class htb 2:3a root leaf 3a:')
|
||||
self.assertRegex(output, 'class htb 2:3b root leaf 3b:')
|
||||
self.assertRegex(output, 'class htb 2:3c root leaf 3c:')
|
||||
self.assertRegex(output, 'prio 1 quantum 4000 rate 1Mbit overhead 100 ceil 500Kbit')
|
||||
self.assertRegex(output, 'burst 123456')
|
||||
self.assertRegex(output, 'cburst 123457')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_ingress')
|
||||
def test_qdisc_ingress(self):
|
||||
copy_network_unit('25-qdisc-clsact.network', '12-dummy.netdev',
|
||||
'25-qdisc-ingress.network', '11-dummy.netdev')
|
||||
start_networkd()
|
||||
self.wait_online(['dummy98:routable', 'test1:routable'])
|
||||
|
||||
output = check_output('tc qdisc show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc clsact')
|
||||
|
||||
output = check_output('tc qdisc show dev test1')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc ingress')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_netem')
|
||||
def test_qdisc_netem(self):
|
||||
copy_network_unit('25-qdisc-netem.network', '12-dummy.netdev',
|
||||
'25-qdisc-netem-compat.network', '11-dummy.netdev')
|
||||
start_networkd()
|
||||
self.wait_online(['dummy98:routable', 'test1:routable'])
|
||||
|
||||
output = check_output('tc qdisc show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc netem 30: root')
|
||||
self.assertRegex(output, 'limit 100 delay 50(.0)?ms 10(.0)?ms loss 20%')
|
||||
|
||||
output = check_output('tc qdisc show dev test1')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc netem [0-9a-f]*: root')
|
||||
self.assertRegex(output, 'limit 100 delay 50(.0)?ms 10(.0)?ms loss 20%')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_pie')
|
||||
def test_qdisc_pie(self):
|
||||
copy_network_unit('25-qdisc-pie.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 pie 3a: root')
|
||||
self.assertRegex(output, 'limit 200000')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_qfq')
|
||||
def test_qdisc_qfq(self):
|
||||
copy_network_unit('25-qdisc-qfq.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 qfq 2: root')
|
||||
output = check_output('tc class show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'class qfq 2:30 root weight 2 maxpkt 16000')
|
||||
self.assertRegex(output, 'class qfq 2:31 root weight 10 maxpkt 8000')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_sfb')
|
||||
def test_qdisc_sfb(self):
|
||||
copy_network_unit('25-qdisc-sfb.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 sfb 39: root')
|
||||
self.assertRegex(output, 'limit 200000')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_sfq')
|
||||
def test_qdisc_sfq(self):
|
||||
copy_network_unit('25-qdisc-sfq.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 sfq 36: root')
|
||||
self.assertRegex(output, 'perturb 5sec')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_tbf')
|
||||
def test_qdisc_tbf(self):
|
||||
copy_network_unit('25-qdisc-tbf.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 tbf 35: root')
|
||||
self.assertRegex(output, 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('sch_teql')
|
||||
def test_qdisc_teql(self):
|
||||
call_quiet('rmmod sch_teql')
|
||||
|
||||
copy_network_unit('25-qdisc-teql.network', '12-dummy.netdev')
|
||||
start_networkd()
|
||||
self.wait_links('dummy98')
|
||||
check_output('modprobe sch_teql max_equalizers=2')
|
||||
self.wait_online(['dummy98:routable'])
|
||||
|
||||
output = check_output('tc qdisc show dev dummy98')
|
||||
print(output)
|
||||
self.assertRegex(output, 'qdisc teql1 31: root')
|
||||
|
||||
def test_wait_online_ipv4(self):
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp-server-with-ipv6-prefix.network', '25-dhcp-client-ipv4-ipv6ra-prefix-client-with-delay.network')
|
||||
start_networkd()
|
||||
|
Loading…
Reference in New Issue
Block a user