Skip to content

Commit 7e4223c

Browse files
mrc0mmandbluca
authored andcommitted
test: fix test_vxlan with the latest iproute2
Some options were renamed and some options with default values are not shown unless -d(etails) is repeated. See: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1215e9d3862387353d8672296cb4c6c16e8cbb72 (cherry picked from commit a5e478b) (cherry picked from commit 67aaab3) (cherry picked from commit 0e2a4bb)
1 parent a6ae06c commit 7e4223c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,18 +1895,22 @@ def test_vxlan(self):
18951895
self.wait_online(['test1:degraded', 'veth99:routable', 'veth-peer:degraded',
18961896
'vxlan99:degraded', 'vxlan98:degraded', 'vxlan97:degraded', 'vxlan-slaac:degraded'])
18971897

1898-
output = check_output('ip -d link show vxlan99')
1898+
output = check_output('ip -d -d link show vxlan99')
18991899
print(output)
19001900
self.assertIn('999', output)
19011901
self.assertIn('5555', output)
19021902
self.assertIn('l2miss', output)
19031903
self.assertIn('l3miss', output)
1904-
self.assertIn('udpcsum', output)
1905-
self.assertIn('udp6zerocsumtx', output)
1906-
self.assertIn('udp6zerocsumrx', output)
1907-
self.assertIn('remcsumtx', output)
1908-
self.assertIn('remcsumrx', output)
19091904
self.assertIn('gbp', output)
1905+
# Since [0] some of the options use slightly different names and some
1906+
# options with default values are shown only if the -d(etails) setting
1907+
# is repeated
1908+
# [0] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1215e9d3862387353d8672296cb4c6c16e8cbb72
1909+
self.assertRegex(output, '(udpcsum|udp_csum)')
1910+
self.assertRegex(output, '(udp6zerocsumtx|udp_zero_csum6_tx)')
1911+
self.assertRegex(output, '(udp6zerocsumrx|udp_zero_csum6_rx)')
1912+
self.assertRegex(output, '(remcsumtx|remcsum_tx)')
1913+
self.assertRegex(output, '(remcsumrx|remcsum_rx)')
19101914

19111915
output = check_output('bridge fdb show dev vxlan99')
19121916
print(output)

0 commit comments

Comments
 (0)