summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py7
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py11
-rw-r--r--tests/topotests/eigrp-topo1/r1/zebra.conf1
-rwxr-xr-xtests/topotests/eigrp-topo1/test_eigrp_topo1.py10
4 files changed, 22 insertions, 7 deletions
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
index 31e23faede..ce542413ba 100644
--- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
@@ -141,7 +141,10 @@ class ThisTestTopo(Topo):
switch[1].add_link(tgen.gears['r2'], nodeif='r2-eth2')
switch[1].add_link(tgen.gears['r3'], nodeif='r3-eth1')
+l3mdev_accept = 0
+
def ltemplatePreRouterStartHook():
+ global l3mdev_accept
cc = ltemplateRtrCmd()
krel = platform.release()
tgen = get_topogen()
@@ -172,7 +175,7 @@ def ltemplatePreRouterStartHook():
'ip ru add oif {0}-cust1 table 10',
'ip ru add iif {0}-cust1 table 10',
'ip link set dev {0}-cust1 up',
- 'sysctl -w net.ipv4.udp_l3mdev_accept={}'.format(l3mdev_accept)]
+ 'sysctl -w net.ipv4.tcp_l3mdev_accept={}'.format(l3mdev_accept)]
for rtr in rtrs:
router = tgen.gears[rtr]
for cmd in cmds:
@@ -202,7 +205,7 @@ def ltemplatePreRouterStartHook():
'ip ru add oif {0}-cust2 table 20',
'ip ru add iif {0}-cust2 table 20',
'ip link set dev {0}-cust2 up',
- 'sysctl -w net.ipv4.udp_l3mdev_accept={}'.format(l3mdev_accept)]
+ 'sysctl -w net.ipv4.tcp_l3mdev_accept={}'.format(l3mdev_accept)]
for rtr in rtrs:
for cmd in cmds:
cc.doCmd(tgen, rtr, cmd.format(rtr))
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py
index 778d504040..f5d73a8c49 100644
--- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py
@@ -1,11 +1,12 @@
from lutil import luCommand
-
-rtrs = ['r1', 'r3', 'r4', 'ce1', 'ce2', 'ce3', 'ce4']
-for rtr in rtrs:
+from customize import l3mdev_accept
+l3mdev_rtrs = ['r1', 'r3', 'r4', 'ce4']
+for rtr in l3mdev_rtrs:
luCommand(rtr,'sysctl net.ipv4.tcp_l3mdev_accept',' = \d*','none','')
found = luLast()
- luCommand(rtr,'ss -aep',':bgp','pass','IPv4:bgp, l3mdev%s' % found.group(0))
- luCommand(rtr,'ss -aep',':.:bgp','pass','IPv6:bgp')
+ luCommand(rtr,'ss -naep',':179','pass','IPv4:bgp, l3mdev{}'.format(found.group(0)))
+ luCommand(rtr,'ss -naep',':.*:179','pass','IPv6:bgp')
+ luCommand(rtr,'sysctl net.ipv4.tcp_l3mdev_accept',' = {}'.format(l3mdev_accept),'pass','l3mdev matches expected (real/expected{}/{})'.format(found.group(0),l3mdev_accept))
rtrs = ['r1', 'r3', 'r4']
for rtr in rtrs:
diff --git a/tests/topotests/eigrp-topo1/r1/zebra.conf b/tests/topotests/eigrp-topo1/r1/zebra.conf
index 8537f6dd80..56ae4a66f4 100644
--- a/tests/topotests/eigrp-topo1/r1/zebra.conf
+++ b/tests/topotests/eigrp-topo1/r1/zebra.conf
@@ -1,4 +1,5 @@
log file zebra.log
+debug zebra rib detail
!
hostname r1
!
diff --git a/tests/topotests/eigrp-topo1/test_eigrp_topo1.py b/tests/topotests/eigrp-topo1/test_eigrp_topo1.py
index 8ea2f0b506..1c00face43 100755
--- a/tests/topotests/eigrp-topo1/test_eigrp_topo1.py
+++ b/tests/topotests/eigrp-topo1/test_eigrp_topo1.py
@@ -171,6 +171,16 @@ def test_zebra_ipv4_routingTable():
assertmsg = 'Zebra IPv4 Routing Table verification failed for router {}'.format(router.name)
assert topotest.json_cmp(output, expected) is None, assertmsg
+def test_shut_interface_and_recover():
+ "Test shutdown of an interface and recovery of the interface"
+
+ tgen = get_topogen()
+ router = tgen.gears['r1']
+ router.run('ip link set r1-eth1 down')
+ topotest.sleep(5, 'Waiting for EIGRP convergence')
+ router.run('ip link set r1-eth1 up')
+
+
def test_shutdown_check_stderr():
if os.environ.get('TOPOTESTS_CHECK_STDERR') is None: