diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-24 04:15:44 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-24 04:15:44 +0200 |
commit | 73d24e45f8ac18eaaebf1df2b1f055c14179c6ff (patch) | |
tree | 9fbc6805e7344bf3cb071895a40a20413c5c7422 /test/test-network | |
parent | network/vlan: paranoia about type safety (diff) | |
download | systemd-73d24e45f8ac18eaaebf1df2b1f055c14179c6ff.tar.xz systemd-73d24e45f8ac18eaaebf1df2b1f055c14179c6ff.zip |
test-network: add tests for vlan QoS mapping
Diffstat (limited to 'test/test-network')
-rw-r--r-- | test/test-network/conf/21-vlan.netdev.d/override.conf | 10 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 14 |
2 files changed, 14 insertions, 10 deletions
diff --git a/test/test-network/conf/21-vlan.netdev.d/override.conf b/test/test-network/conf/21-vlan.netdev.d/override.conf index 3b8d47d9b1..c71077d274 100644 --- a/test/test-network/conf/21-vlan.netdev.d/override.conf +++ b/test/test-network/conf/21-vlan.netdev.d/override.conf @@ -3,7 +3,9 @@ MTUBytes=2000 [VLAN] Id=99 -GVRP=true -MVRP=true -LooseBinding=true -ReorderHeader=true +GVRP=yes +MVRP=yes +LooseBinding=yes +ReorderHeader=yes +EgressQOSMaps=0-1 1-3 10-3 6-6 7-7 +IngressQOSMaps=15-13 20-100 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index fe72f37ce4..8b01718d55 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1285,12 +1285,14 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): output = check_output('ip -d link show vlan99') print(output) - self.assertRegex(output, ' mtu 2000 ') - self.assertRegex(output, 'REORDER_HDR') - self.assertRegex(output, 'LOOSE_BINDING') - self.assertRegex(output, 'GVRP') - self.assertRegex(output, 'MVRP') - self.assertRegex(output, ' id 99 ') + self.assertIn(' mtu 2000 ', output) + self.assertIn('REORDER_HDR', output) + self.assertIn('LOOSE_BINDING', output) + self.assertIn('GVRP', output) + self.assertIn('MVRP', output) + self.assertIn(' id 99 ', output) + self.assertIn('ingress-qos-map { 4:100 7:13 }', output) + self.assertIn('egress-qos-map { 0:1 1:3 6:6 7:7 10:3 }', output) output = check_output('ip -4 address show dev test1') print(output) |