Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: forwarding: Make vxlan-bridge-1d pass on debug kernels

The ageing time used by the test is too short for debug kernels and
results in entries being aged out prematurely [1].

Fix by increasing the ageing time.

The same change was done for the VLAN-aware version of the test in
commit dfbab74044be ("selftests: forwarding: Make vxlan-bridge-1q pass
on debug kernels").

[1]
# ./vxlan_bridge_1d.sh
[...]
# TEST: VXLAN: flood before learning [ OK ]
# TEST: VXLAN: show learned FDB entry [ OK ]
# TEST: VXLAN: learned FDB entry [FAIL]
# veth3: Expected to capture 0 packets, got 4.
# RTNETLINK answers: No such file or directory
# TEST: VXLAN: deletion of learned FDB entry [ OK ]
# TEST: VXLAN: Ageing of learned FDB entry [FAIL]
# veth3: Expected to capture 0 packets, got 2.
[...]

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240707095458.2870260-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Ido Schimmel and committed by
Jakub Kicinski
3699e57a 7b769adc

+4 -4
+4 -4
tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
··· 680 680 local mac=de:ad:be:ef:13:37 681 681 local dst=192.0.2.100 682 682 683 - # Enable learning on the VxLAN device and set ageing time to 10 seconds 684 - ip link set dev br1 type bridge ageing_time 1000 685 - ip link set dev vx1 type vxlan ageing 10 683 + # Enable learning on the VxLAN device and set ageing time to 30 seconds 684 + ip link set dev br1 type bridge ageing_time 3000 685 + ip link set dev vx1 type vxlan ageing 30 686 686 ip link set dev vx1 type vxlan learning 687 687 reapply_config 688 688 ··· 740 740 741 741 vxlan_flood_test $mac $dst 0 10 0 742 742 743 - sleep 20 743 + sleep 60 744 744 745 745 bridge fdb show brport vx1 | grep $mac | grep -q self 746 746 check_fail $?