tests: Pim vrf's need 4.19 or better to run properly not 4.15

Tests are failing in micronet because linux kernel needs are 4.19
not 4.15

2023-01-11 17:15:06,657.657 INFO: topolog.r1: vtysh command => "show zebra"
2023-01-11 17:15:06,657.657 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show zebra" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,729.729 INFO: topolog.r1: vtysh result:
	OS                             Linux(4.15.0-193-generic)

Notice the missing pimreg11 device needed in vrf blue:

2023-01-11 17:15:06,731.731 DEBUG: topolog.r1: LinuxNamespace(r1): cmd_status("['/bin/bash', '-c', 'vtysh  -c "show int brief" 2>/dev/null']", kwargs: {'encoding': 'utf-8', 'stdout': -1, 'stderr': -2, 'shell': False, 'stdin': None})
2023-01-11 17:15:06,781.781 INFO: topolog.r1: vtysh result:
	Interface       Status  VRF             Addresses
	---------       ------  ---             ---------
	blue            up      blue            192.168.0.1/32
	r1-eth0         up      blue            192.168.100.1/24
	r1-eth1         up      blue            192.168.101.1/24

	Interface       Status  VRF             Addresses
	---------       ------  ---             ---------
	erspan0         down    default
	gre0            down    default
	gretap0         down    default
	lo              up      default
	pimreg          up      default

	Interface       Status  VRF             Addresses
	---------       ------  ---             ---------
	r1-eth2         up      red             192.168.100.1/24
	r1-eth3         up      red             192.168.101.1/24
	red             up      red             192.168.0.1/32

While on a 5.4 machine we have this:

mininet310# show int brief
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
blue            up      blue
dummy1          up      blue
dummy2          up      blue
pimreg11        up      blue

As such let's limit the test to a 4.19 kernel or above that our
documentations states we need for proper pim operation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-01-11 12:27:24 -05:00
parent 2d02b3372d
commit c72e51ac70

View File

@ -166,6 +166,11 @@ def setup_module(module):
tgen = Topogen(build_topo, module.__name__) tgen = Topogen(build_topo, module.__name__)
tgen.start_topology() tgen.start_topology()
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("4.19")
if result is not True:
pytest.skip("Kernel requirements are not met")
vrf_setup_cmds = [ vrf_setup_cmds = [
"ip link add name blue type vrf table 11", "ip link add name blue type vrf table 11",
"ip link add name red type vrf table 12", "ip link add name red type vrf table 12",
@ -210,11 +215,6 @@ def test_ospf_convergence():
"Test for OSPFv2 convergence" "Test for OSPFv2 convergence"
tgen = get_topogen() tgen = get_topogen()
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("4.15")
if result is not True:
pytest.skip("Kernel requirements are not met")
# iproute2 needs to support VRFs for this suite to run. # iproute2 needs to support VRFs for this suite to run.
if not iproute2_is_vrf_capable(): if not iproute2_is_vrf_capable():
pytest.skip("Installed iproute2 version does not support VRFs") pytest.skip("Installed iproute2 version does not support VRFs")