]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: test_vxlan_under_vrf: Fix broken test case
authorIdo Schimmel <idosch@nvidia.com>
Thu, 24 Mar 2022 20:05:14 +0000 (22:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 26 Mar 2022 00:00:11 +0000 (17:00 -0700)
commit163f7b022d470fbdb746b55cd665e6abb1467b68
tree58523118e49e914a3fa598e3494a2a5fad5651a9
parentc83fad30555a2d52a16a670f534b970044d116db
selftests: test_vxlan_under_vrf: Fix broken test case

The purpose of the last test case is to test VXLAN encapsulation and
decapsulation when the underlay lookup takes place in a non-default VRF.
This is achieved by enslaving the physical device of the tunnel to a
VRF.

The binding of the VXLAN UDP socket to the VRF happens when the VXLAN
device itself is opened, not when its physical device is opened. This
was also mentioned in the cited commit ("tests that moving the underlay
from a VRF to another works when down/up the VXLAN interface"), but the
test did something else.

Fix it by reopening the VXLAN device instead of its physical device.

Before:

 # ./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]

After:

 # ./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)            [ OK ]

Fixes: 972341597ee9 ("test/net: Add script for VXLAN underlay in a VRF")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20220324200514.1638326-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/test_vxlan_under_vrf.sh