selftests: net: test_vxlan_under_vrf: fix HV connectivity test
authorAndrea Righi <andrea.righi@canonical.com>
Fri, 5 Nov 2021 15:55:29 +0000 (16:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Nov 2021 14:31:02 +0000 (14:31 +0000)
commite7e4785fa30f9b5d1b60ed2d8e221891325dfc5f
tree4e9cb778beaee9b1f045bed4ab7836d32c7528cf
parent1413ff132f289ea21d9f0f35546457442282ea7d
selftests: net: test_vxlan_under_vrf: fix HV connectivity test

It looks like test_vxlan_under_vrf.sh is always failing to verify the
connectivity test during the ping between the two simulated VMs.

This is due to the fact that veth-hv in each VM should have a distinct
MAC address.

Fix by setting a unique MAC address on each simulated VM interface.

Without this fix:

 $ sudo ./tools/testing/selftests/net/test_vxlan_under_vrf.sh
 Checking HV connectivity                                           [ OK ]
 Check VM connectivity through VXLAN (underlay in the default VRF)  [FAIL]

With this fix applied:

 $ sudo ./tools/testing/selftests/net/test_vxlan_under_vrf.sh
 Checking HV connectivity                                           [ OK ]
 Check VM connectivity through VXLAN (underlay in the default VRF)  [ OK ]
 Check VM connectivity through VXLAN (underlay in a VRF)            [FAIL]

NOTE: the connectivity test with the underlay VRF is still failing; it
seems that ARP requests are blocked at the simulated hypervisor level,
probably due to some missing ARP forwarding rules. This requires more
investigation (in the meantime we may consider to set that test as
expected failure - XFAIL).

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/test_vxlan_under_vrf.sh