Skip to content

Commit

Permalink
test: fix test_vxlan with the latest iproute2
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrc0mmand committed Jun 30, 2023
1 parent dbf7509 commit a5e478b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions test/test-network/systemd-networkd-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2104,18 +2104,22 @@ def test_vxlan(self):
self.wait_online(['test1:degraded', 'veth99:routable', 'veth-peer:degraded',
'vxlan99:degraded', 'vxlan98:degraded', 'vxlan97:degraded', 'vxlan-slaac:degraded'])

output = check_output('ip -d link show vxlan99')
output = check_output('ip -d -d link show vxlan99')
print(output)
self.assertIn('999', output)
self.assertIn('5555', output)
self.assertIn('l2miss', output)
self.assertIn('l3miss', output)
self.assertIn('udpcsum', output)
self.assertIn('udp6zerocsumtx', output)
self.assertIn('udp6zerocsumrx', output)
self.assertIn('remcsumtx', output)
self.assertIn('remcsumrx', output)
self.assertIn('gbp', output)
# Since [0] some of the options use slightly different names and some
# options with default values are shown only if the -d(etails) setting
# is repeated
# [0] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=1215e9d3862387353d8672296cb4c6c16e8cbb72
self.assertRegex(output, '(udpcsum|udp_csum)')
self.assertRegex(output, '(udp6zerocsumtx|udp_zero_csum6_tx)')
self.assertRegex(output, '(udp6zerocsumrx|udp_zero_csum6_rx)')
self.assertRegex(output, '(remcsumtx|remcsum_tx)')
self.assertRegex(output, '(remcsumrx|remcsum_rx)')

output = check_output('bridge fdb show dev vxlan99')
print(output)
Expand Down

0 comments on commit a5e478b

Please sign in to comment.