Skip to content

Commit d1087bc

Browse files
yuwatakeszybz
authored andcommitted
test-network: add tests for vlan QoS mapping
(cherry picked from commit 73d24e4)
1 parent 7ed7b07 commit d1087bc

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

test/test-network/conf/21-vlan.netdev.d/override.conf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ MTUBytes=2000
33

44
[VLAN]
55
Id=99
6-
GVRP=true
7-
MVRP=true
8-
LooseBinding=true
9-
ReorderHeader=true
6+
GVRP=yes
7+
MVRP=yes
8+
LooseBinding=yes
9+
ReorderHeader=yes
10+
EgressQOSMaps=0-1 1-3 10-3 6-6 7-7
11+
IngressQOSMaps=15-13 20-100

test/test-network/systemd-networkd-tests.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,12 +1285,14 @@ def test_vlan(self):
12851285

12861286
output = check_output('ip -d link show vlan99')
12871287
print(output)
1288-
self.assertRegex(output, ' mtu 2000 ')
1289-
self.assertRegex(output, 'REORDER_HDR')
1290-
self.assertRegex(output, 'LOOSE_BINDING')
1291-
self.assertRegex(output, 'GVRP')
1292-
self.assertRegex(output, 'MVRP')
1293-
self.assertRegex(output, ' id 99 ')
1288+
self.assertIn(' mtu 2000 ', output)
1289+
self.assertIn('REORDER_HDR', output)
1290+
self.assertIn('LOOSE_BINDING', output)
1291+
self.assertIn('GVRP', output)
1292+
self.assertIn('MVRP', output)
1293+
self.assertIn(' id 99 ', output)
1294+
self.assertIn('ingress-qos-map { 4:100 7:13 }', output)
1295+
self.assertIn('egress-qos-map { 0:1 1:3 6:6 7:7 10:3 }', output)
12941296

12951297
output = check_output('ip -4 address show dev test1')
12961298
print(output)

0 commit comments

Comments
 (0)