summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ospf6d/test_lsdb.c1
-rw-r--r--tests/topotests/bgp_dual_as/__init__.py0
-rw-r--r--tests/topotests/bgp_dual_as/r1/frr.conf11
-rw-r--r--tests/topotests/bgp_dual_as/r2/frr.conf10
-rw-r--r--tests/topotests/bgp_dual_as/test_bgp_dual_as.py124
-rw-r--r--tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py2
-rw-r--r--tests/topotests/dump_of_bgp/r1/frr.conf12
-rw-r--r--tests/topotests/dump_of_bgp/r2/frr.conf17
-rw-r--r--tests/topotests/dump_of_bgp/test_dump_of_bgp.py102
-rw-r--r--tests/topotests/forwarding_on_off/r1/frr.conf14
-rw-r--r--tests/topotests/forwarding_on_off/r2/frr.conf19
-rw-r--r--tests/topotests/forwarding_on_off/r3/frr.conf15
-rw-r--r--tests/topotests/forwarding_on_off/test_forwarding_on_off.py104
-rw-r--r--tests/topotests/lib/common_config.py2
-rw-r--r--tests/topotests/lib/topotest.py2
-rw-r--r--tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt2
-rw-r--r--tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt4
-rw-r--r--tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt2
-rw-r--r--tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt6
-rw-r--r--tests/topotests/srv6_encap_src_addr/r1/zebra.conf1
-rw-r--r--tests/topotests/srv6_sid_manager/rt1/bgpd.conf1
-rw-r--r--tests/topotests/srv6_sid_manager/rt6/bgpd.conf1
-rw-r--r--tests/topotests/zebra_seg6local_route/r1/routes.json73
-rwxr-xr-xtests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py2
24 files changed, 513 insertions, 14 deletions
diff --git a/tests/ospf6d/test_lsdb.c b/tests/ospf6d/test_lsdb.c
index f9df73538a..9cec4a3182 100644
--- a/tests/ospf6d/test_lsdb.c
+++ b/tests/ospf6d/test_lsdb.c
@@ -12,6 +12,7 @@
#include "vector.h"
#include "vty.h"
+#include "ospf6d/ospf6_proto.h" /* for struct ospf6_prefix */
#include "ospf6d/ospf6_lsa.h"
#include "ospf6d/ospf6_lsdb.h"
diff --git a/tests/topotests/bgp_dual_as/__init__.py b/tests/topotests/bgp_dual_as/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/topotests/bgp_dual_as/__init__.py
diff --git a/tests/topotests/bgp_dual_as/r1/frr.conf b/tests/topotests/bgp_dual_as/r1/frr.conf
new file mode 100644
index 0000000000..9dcfe05d69
--- /dev/null
+++ b/tests/topotests/bgp_dual_as/r1/frr.conf
@@ -0,0 +1,11 @@
+!
+interface r1-eth0
+ ip address 10.0.0.1/24
+!
+router bgp 65000
+ no bgp ebgp-requires-policy
+ neighbor 10.0.0.2 remote-as 65002
+ neighbor 10.0.0.2 local-as 65001 no-prepend replace-as dual-as
+ neighbor 10.0.0.2 timers 3 10
+ neighbor 10.0.0.2 timers connect 1
+!
diff --git a/tests/topotests/bgp_dual_as/r2/frr.conf b/tests/topotests/bgp_dual_as/r2/frr.conf
new file mode 100644
index 0000000000..cf5731b601
--- /dev/null
+++ b/tests/topotests/bgp_dual_as/r2/frr.conf
@@ -0,0 +1,10 @@
+!
+interface r2-eth0
+ ip address 10.0.0.2/24
+!
+router bgp 65002
+ no bgp ebgp-requires-policy
+ neighbor 10.0.0.1 remote-as 65001
+ neighbor 10.0.0.1 timers 3 10
+ neighbor 10.0.0.1 timers connect 1
+!
diff --git a/tests/topotests/bgp_dual_as/test_bgp_dual_as.py b/tests/topotests/bgp_dual_as/test_bgp_dual_as.py
new file mode 100644
index 0000000000..fcac9c94ec
--- /dev/null
+++ b/tests/topotests/bgp_dual_as/test_bgp_dual_as.py
@@ -0,0 +1,124 @@
+#!/usr/bin/env python
+# SPDX-License-Identifier: ISC
+
+#
+# Copyright (c) 2024 by
+# Donatas Abraitis <donatas@opensourcerouting.org>
+#
+
+import os
+import sys
+import json
+import pytest
+import functools
+
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+from lib import topotest
+from lib.topogen import Topogen, get_topogen
+from lib.common_config import step
+
+pytestmark = [pytest.mark.bgpd]
+
+
+def build_topo(tgen):
+ r1 = tgen.add_router("r1")
+ r2 = tgen.add_router("r2")
+
+ switch = tgen.add_switch("s1")
+ switch.add_link(r1)
+ switch.add_link(r2)
+
+
+def setup_module(mod):
+ tgen = Topogen(build_topo, mod.__name__)
+ tgen.start_topology()
+
+ for _, (rname, router) in enumerate(tgen.routers().items(), 1):
+ router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
+
+ tgen.start_router()
+
+
+def teardown_module(mod):
+ tgen = get_topogen()
+ tgen.stop_topology()
+
+
+def test_bgp_dual_as():
+ tgen = get_topogen()
+
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+ r2 = tgen.gears["r2"]
+
+ def _bgp_converge_65001():
+ output = json.loads(r1.vtysh_cmd("show bgp ipv4 summary json"))
+ expected = {
+ "ipv4Unicast": {
+ "as": 65000,
+ "peers": {
+ "10.0.0.2": {
+ "hostname": "r2",
+ "remoteAs": 65002,
+ "localAs": 65001,
+ "state": "Established",
+ "peerState": "OK",
+ }
+ },
+ }
+ }
+ return topotest.json_cmp(output, expected)
+
+ test_func = functools.partial(_bgp_converge_65001)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ assert result is None, "Can't establish BGP session using local-as AS 65001"
+
+ step("Change remote-as from r2 to use global AS 65000")
+ r2.vtysh_cmd(
+ """
+ configure terminal
+ router bgp
+ neighbor 10.0.0.1 remote-as 65000
+ """
+ )
+
+ def _bgp_converge_65000():
+ output = json.loads(r1.vtysh_cmd("show bgp ipv4 summary json"))
+ expected = {
+ "ipv4Unicast": {
+ "as": 65000,
+ "peers": {
+ "10.0.0.2": {
+ "hostname": "r2",
+ "remoteAs": 65002,
+ "localAs": 65000,
+ "state": "Established",
+ "peerState": "OK",
+ }
+ },
+ }
+ }
+ return topotest.json_cmp(output, expected)
+
+ test_func = functools.partial(_bgp_converge_65000)
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ assert result is None, "Can't establish BGP session using global AS 65000"
+
+
+def test_memory_leak():
+ "Run the memory leak test and report results."
+ tgen = get_topogen()
+ if not tgen.is_memleak_enabled():
+ pytest.skip("Memory leak test/report is disabled")
+
+ tgen.report_memory_leaks()
+
+
+if __name__ == "__main__":
+ args = ["-s"] + sys.argv[1:]
+ sys.exit(pytest.main(args))
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py
index 2400cd2853..bba0061858 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py
@@ -21,7 +21,7 @@ from lib import topotest
from lib.topogen import Topogen, TopoRouter, get_topogen
from lib.topolog import logger
from lib.common_config import required_linux_kernel_version
-from lib.checkping import check_ping, check_ping
+from lib.checkping import check_ping
pytestmark = [pytest.mark.bgpd]
diff --git a/tests/topotests/dump_of_bgp/r1/frr.conf b/tests/topotests/dump_of_bgp/r1/frr.conf
new file mode 100644
index 0000000000..d677e2007e
--- /dev/null
+++ b/tests/topotests/dump_of_bgp/r1/frr.conf
@@ -0,0 +1,12 @@
+!
+int r1-eth0
+ ip address 192.168.1.1/24
+!
+router bgp 65001
+ no bgp ebgp-requires-policy
+ neighbor 192.168.1.2 remote-as external
+ neighbor 192.168.1.2 timers 1 3
+ neighbor 192.168.1.2 timers connect 1
+ neighbor 192.168.1.2 capability dynamic
+ !
+!
diff --git a/tests/topotests/dump_of_bgp/r2/frr.conf b/tests/topotests/dump_of_bgp/r2/frr.conf
new file mode 100644
index 0000000000..d68d13d075
--- /dev/null
+++ b/tests/topotests/dump_of_bgp/r2/frr.conf
@@ -0,0 +1,17 @@
+!
+int lo
+ ip address 10.10.10.10/32
+!
+int r2-eth0
+ ip address 192.168.1.2/24
+!
+router bgp 65002
+ no bgp ebgp-requires-policy
+ neighbor 192.168.1.1 remote-as external
+ neighbor 192.168.1.1 timers 1 3
+ neighbor 192.168.1.1 timers connect 1
+ !
+ address-family ipv4 unicast
+ redistribute connected
+ exit-address-family
+!
diff --git a/tests/topotests/dump_of_bgp/test_dump_of_bgp.py b/tests/topotests/dump_of_bgp/test_dump_of_bgp.py
new file mode 100644
index 0000000000..1359c57f31
--- /dev/null
+++ b/tests/topotests/dump_of_bgp/test_dump_of_bgp.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+# SPDX-License-Identifier: ISC
+
+# Copyright (c) 2024 by Nvidia Corporation
+# Donald Sharp <sharpd@nvidia.com>
+
+import os
+import sys
+import json
+import pytest
+import functools
+from lib.topolog import logger
+
+pytestmark = [pytest.mark.bgpd]
+
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+from lib import topotest
+from lib.topogen import Topogen, get_topogen
+
+
+def setup_module(mod):
+ topodef = {"s1": ("r1", "r2")}
+ tgen = Topogen(topodef, mod.__name__)
+ tgen.start_topology()
+
+ router_list = tgen.routers()
+
+ for _, (rname, router) in enumerate(router_list.items(), 1):
+ router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
+
+ tgen.start_router()
+
+
+def teardown_module(mod):
+ tgen = get_topogen()
+ tgen.stop_topology()
+
+
+def test_bgp_dump():
+ tgen = get_topogen()
+
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ logger.info("Test the ability for bgp to dump a file specified")
+ r1 = tgen.gears["r1"]
+
+ logger.info("Converge BGP")
+ def _converge():
+ output = json.loads(r1.vtysh_cmd("show bgp ipv4 unicast 10.10.10.10/32 json"))
+ expected = {
+ "paths": [
+ {
+ "valid": True,
+ "nexthops": [
+ {
+ "hostname": "r2",
+ "accessible": True,
+ }
+ ],
+ }
+ ]
+ }
+ return topotest.json_cmp(output, expected)
+
+ test_func = functools.partial(
+ _converge,
+ )
+ _, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+ assert result is None, "Can't converge"
+
+ logger.info("Dumping file")
+ ####
+ # Create a dump file
+ ####
+ r1.vtysh_cmd(
+ """
+ configure terminal
+ dump bgp all bgp_dump.file
+ """
+ )
+
+ def _test_dump_file_existence():
+ dump_file = "{}/r1/bgp_dump.file".format(tgen.logdir)
+
+ logger.info("Looking for {} file".format(dump_file))
+ logger.info(os.path.isfile(dump_file))
+ return os.path.isfile(dump_file)
+
+ logger.info("Ensure that Log file exists")
+ _, result = topotest.run_and_expect(_test_dump_file_existence, True, count=30, wait = 3)
+ assert result is True
+
+ # At this point all we have done is ensure that the dump file
+ # is generated for r1. What is correctness of the dump anyways?
+
+if __name__ == "__main__":
+ args = ["-s"] + sys.argv[1:]
+ sys.exit(pytest.main(args))
diff --git a/tests/topotests/forwarding_on_off/r1/frr.conf b/tests/topotests/forwarding_on_off/r1/frr.conf
new file mode 100644
index 0000000000..677ba8f63e
--- /dev/null
+++ b/tests/topotests/forwarding_on_off/r1/frr.conf
@@ -0,0 +1,14 @@
+int lo
+ ip address 10.1.1.1/32
+ ip address 10:1::1:1/128
+
+int eth0
+ ip address 10.1.2.1/24
+ ipv6 address 10:1::2:1/120
+
+ip route 10.1.1.2/32 10.1.2.2
+ip route 10.1.1.3/32 10.1.2.2
+ip route 10.1.3.0/24 10.1.2.2
+ipv6 route 10:1::1:2/128 10:1::2:2
+ipv6 route 10:1::1:3/128 10:1::2:2
+ipv6 route 10:1::3:0/90 10:1::2:2 \ No newline at end of file
diff --git a/tests/topotests/forwarding_on_off/r2/frr.conf b/tests/topotests/forwarding_on_off/r2/frr.conf
new file mode 100644
index 0000000000..b6da6e2231
--- /dev/null
+++ b/tests/topotests/forwarding_on_off/r2/frr.conf
@@ -0,0 +1,19 @@
+no ip forwarding
+no ipv6 forwarding
+
+int lo
+ ip address 10.1.1.2/32
+ ipv6 address 10:1::1:2/128
+
+int eth0
+ ip address 10.1.2.2/24
+ ipv6 address 10:1::2:2/120
+
+int eth1
+ ip address 10.1.3.2/24
+ ipv6 address 10:1::3:2/120
+
+ip route 10.1.1.1/32 10.1.2.1
+ip route 10.1.1.3/32 10.1.3.3
+ipv6 route 10:1::1:1/128 10:1::2:1
+ipv6 route 10:1::1:3/128 10:1::3:3
diff --git a/tests/topotests/forwarding_on_off/r3/frr.conf b/tests/topotests/forwarding_on_off/r3/frr.conf
new file mode 100644
index 0000000000..ea05f18400
--- /dev/null
+++ b/tests/topotests/forwarding_on_off/r3/frr.conf
@@ -0,0 +1,15 @@
+int lo
+ ip address 10.1.1.3/32
+ ipv6 address 10:1::1:3/128
+
+int eth0
+ ip address 10.1.3.3/24
+ ipv6 address 10:1::3:3/120
+
+
+ip route 10.1.1.1/32 10.1.3.2
+ip route 10.1.1.2/32 10.1.3.2
+ip route 10.1.2.0/24 10.1.3.2
+ipv6 route 10:1::1:1/128 10:1::3:2
+ipv6 route 10:1::1:2/128 10:1::3:2
+ipv6 route 10:1::2:0/120 10:1::3:2 \ No newline at end of file
diff --git a/tests/topotests/forwarding_on_off/test_forwarding_on_off.py b/tests/topotests/forwarding_on_off/test_forwarding_on_off.py
new file mode 100644
index 0000000000..fa0483888c
--- /dev/null
+++ b/tests/topotests/forwarding_on_off/test_forwarding_on_off.py
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+# SPDX-License-Identifier: ISC
+#
+# test_forwarding_on_off.py
+#
+# Copyright (c) 2024 by Nvidia Corporation
+# Donald Sharp
+#
+
+"""
+test_forwarding_on_off.py: Test that forwarding is turned off then back on
+
+"""
+
+import ipaddress
+import json
+import pytest
+import sys
+import time
+
+from functools import partial
+from lib import topotest
+from lib.topogen import Topogen, get_topogen
+from lib.topolog import logger
+from lib.checkping import check_ping
+
+pytestmark = [
+ pytest.mark.staticd,
+]
+
+
+def build_topo(tgen):
+ """Build the topology used by all tests below."""
+
+ # Create 3 routers
+ r1 = tgen.add_router("r1")
+ r2 = tgen.add_router("r2")
+ r3 = tgen.add_router("r3")
+
+ # Add a link between r1 <-> r2 and r2 <-> r3
+ tgen.add_link(r1, r2, ifname1="eth0", ifname2="eth0")
+ tgen.add_link(r2, r3, ifname1="eth1", ifname2="eth0")
+
+
+def setup_module(mod):
+ tgen = Topogen(build_topo, mod.__name__)
+ tgen.start_topology()
+
+ router_list = tgen.routers()
+
+ for _, router in router_list.items():
+ router.load_frr_config("frr.conf")
+
+ tgen.start_router()
+
+
+def teardown_module():
+ tgen = get_topogen()
+ tgen.stop_topology()
+
+
+def test_no_forwarding():
+ tgen = get_topogen()
+ r2 = tgen.gears["r2"]
+
+ def _no_forwarding(family, status):
+ logger.info("Testing for: {} {}".format(family, status))
+ rc, o, e = r2.net.cmd_status(
+ 'vtysh -c "show zebra" | grep "{}" | grep "{}"'.format(family, status)
+ )
+
+ logger.info("Output: {}".format(o))
+ return rc
+
+ test_func = partial(_no_forwarding, "v4 Forwarding", "Off")
+ _, result = topotest.run_and_expect(test_func, 0, count=15, wait=1)
+ assert result == 0
+
+ test_func = partial(_no_forwarding, "v6 Forwarding", "Off")
+ _, result = topotest.run_and_expect(test_func, 0, count=15, wait=1)
+ assert result == 0
+
+ logger.info("Sending pings that should fail")
+ check_ping("r1", "10.1.1.3", False, 10, 1)
+ check_ping("r1", "10:1::1:3", False, 10, 1)
+
+ logger.info("Turning on Forwarding")
+ r2.vtysh_cmd("conf\nip forwarding\nipv6 forwarding")
+
+ test_func = partial(_no_forwarding, "v4 Forwarding", "On")
+ _, result = topotest.run_and_expect(test_func, 0, count=15, wait=1)
+ assert result == 0
+
+ test_func = partial(_no_forwarding, "v6 Forwarding", "On")
+ _, result = topotest.run_and_expect(test_func, 0, count=15, wait=1)
+ assert result == 0
+
+ check_ping("r1", "10.1.1.3", True, 10, 1)
+ check_ping("r1", "10:1::1:3", True, 10, 1)
+
+
+if __name__ == "__main__":
+ args = ["-s"] + sys.argv[1:]
+ sys.exit(pytest.main(args))
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index 540a627c65..cb71112af3 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -936,7 +936,7 @@ def generate_support_bundle():
tgen = get_topogen()
if tgen is None:
- logger.warn(
+ logger.warning(
"Support bundle attempted to be generated, but topogen is not being used"
)
return True
diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py
index dc6107bbef..d15fefc039 100644
--- a/tests/topotests/lib/topotest.py
+++ b/tests/topotests/lib/topotest.py
@@ -424,7 +424,7 @@ def run_and_expect(func, what, count=20, wait=3):
minimum_wait_time = 15 # The overall minimum seconds for the test to wait
wait_time = wait * count
if wait_time < minimum_wait_time:
- logger.warn(
+ logger.warning(
f"Waiting time is too small (count={count}, wait={wait}), using default values (count={minimum_count}, wait={minimum_wait})"
)
count = minimum_count
diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt
index 797bced7b8..131085a47a 100644
--- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt
+++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt
@@ -2,7 +2,7 @@ O 10.0.1.0/24 [110/10] is directly connected, r1-eth0, weight 1, XX:XX:XX
C>* 10.0.1.0/24 is directly connected, r1-eth0, weight 1, XX:XX:XX
L>* 10.0.1.1/32 is directly connected, r1-eth0, weight 1, XX:XX:XX
O>* 10.0.2.0/24 [110/20] via 10.0.20.2, r1-eth1, weight 1, XX:XX:XX
-B>* 10.0.3.0/24 [20/20] via 10.0.30.3, r1-eth2 (vrf neno), weight 1, XX:XX:XX
+B>* 10.0.3.0/24 [110/20] via 10.0.30.3, r1-eth2 (vrf neno), weight 1, XX:XX:XX
O>* 10.0.4.0/24 [110/20] via 10.0.20.2, r1-eth1, weight 1, XX:XX:XX
O 10.0.20.0/24 [110/10] is directly connected, r1-eth1, weight 1, XX:XX:XX
C>* 10.0.20.0/24 is directly connected, r1-eth1, weight 1, XX:XX:XX
diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt
index 1dc574f360..45ee1071d4 100644
--- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt
+++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt
@@ -1,7 +1,7 @@
VRF neno:
O>* 10.0.3.0/24 [110/20] via 10.0.30.3, r1-eth2, weight 1, XX:XX:XX
-B>* 10.0.4.0/24 [20/20] via 10.0.20.2, r1-eth1 (vrf default), weight 1, XX:XX:XX
+B>* 10.0.4.0/24 [110/20] via 10.0.20.2, r1-eth1 (vrf default), weight 1, XX:XX:XX
O 10.0.30.0/24 [110/10] is directly connected, r1-eth2, weight 1, XX:XX:XX
C>* 10.0.30.0/24 is directly connected, r1-eth2, weight 1, XX:XX:XX
L>* 10.0.30.1/32 is directly connected, r1-eth2, weight 1, XX:XX:XX
-B>* 10.0.40.0/24 [20/20] via 10.0.20.2, r1-eth1 (vrf default), weight 1, XX:XX:XX
+B>* 10.0.40.0/24 [110/20] via 10.0.20.2, r1-eth1 (vrf default), weight 1, XX:XX:XX
diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt
index b5e81bc0e9..f3724bbb9f 100644
--- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt
+++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt
@@ -4,7 +4,7 @@ O 10.0.2.0/24 [110/10] is directly connected, r2-eth0, weight 1, XX:XX:XX
C>* 10.0.2.0/24 is directly connected, r2-eth0, weight 1, XX:XX:XX
L>* 10.0.2.2/32 is directly connected, r2-eth0, weight 1, XX:XX:XX
O>* 10.0.3.0/24 [110/20] via 10.0.20.1, r2-eth1, weight 1, XX:XX:XX
-B>* 10.0.4.0/24 [20/20] via 10.0.40.4, r2-eth2 (vrf ray), weight 1, XX:XX:XX
+B>* 10.0.4.0/24 [110/20] via 10.0.40.4, r2-eth2 (vrf ray), weight 1, XX:XX:XX
O 10.0.20.0/24 [110/10] is directly connected, r2-eth1, weight 1, XX:XX:XX
C>* 10.0.20.0/24 is directly connected, r2-eth1, weight 1, XX:XX:XX
L>* 10.0.20.2/32 is directly connected, r2-eth1, weight 1, XX:XX:XX
diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt
index c403496ff6..0f8b12bdfa 100644
--- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt
+++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt
@@ -1,10 +1,10 @@
VRF ray:
-B 10.0.1.0/24 [20/20] via 10.0.20.1, r2-eth1 (vrf default) inactive, weight 1, XX:XX:XX
+B 10.0.1.0/24 [110/20] via 10.0.20.1, r2-eth1 (vrf default) inactive, weight 1, XX:XX:XX
B 10.0.2.0/24 [20/0] is directly connected, r2-eth0 (vrf default) inactive, weight 1, XX:XX:XX
-B>* 10.0.3.0/24 [20/20] via 10.0.20.1, r2-eth1 (vrf default), weight 1, XX:XX:XX
+B>* 10.0.3.0/24 [110/20] via 10.0.20.1, r2-eth1 (vrf default), weight 1, XX:XX:XX
O>* 10.0.4.0/24 [110/20] via 10.0.40.4, r2-eth2, weight 1, XX:XX:XX
B 10.0.20.0/24 [20/0] is directly connected, r2-eth1 (vrf default) inactive, weight 1, XX:XX:XX
-B>* 10.0.30.0/24 [20/20] via 10.0.20.1, r2-eth1 (vrf default), weight 1, XX:XX:XX
+B>* 10.0.30.0/24 [110/20] via 10.0.20.1, r2-eth1 (vrf default), weight 1, XX:XX:XX
O 10.0.40.0/24 [110/10] is directly connected, r2-eth2, weight 1, XX:XX:XX
C>* 10.0.40.0/24 is directly connected, r2-eth2, weight 1, XX:XX:XX
L>* 10.0.40.2/32 is directly connected, r2-eth2, weight 1, XX:XX:XX
diff --git a/tests/topotests/srv6_encap_src_addr/r1/zebra.conf b/tests/topotests/srv6_encap_src_addr/r1/zebra.conf
index c570756b52..c245dd2d96 100644
--- a/tests/topotests/srv6_encap_src_addr/r1/zebra.conf
+++ b/tests/topotests/srv6_encap_src_addr/r1/zebra.conf
@@ -4,7 +4,6 @@ hostname r1
! debug zebra rib detailed
!
log stdout notifications
-log monitor notifications
log commands
log file zebra.log debugging
!
diff --git a/tests/topotests/srv6_sid_manager/rt1/bgpd.conf b/tests/topotests/srv6_sid_manager/rt1/bgpd.conf
index 461e9023f0..20c396afde 100644
--- a/tests/topotests/srv6_sid_manager/rt1/bgpd.conf
+++ b/tests/topotests/srv6_sid_manager/rt1/bgpd.conf
@@ -6,7 +6,6 @@ hostname rt1
password zebra
!
log stdout notifications
-log monitor notifications
log commands
!
!debug bgp neighbor-events
diff --git a/tests/topotests/srv6_sid_manager/rt6/bgpd.conf b/tests/topotests/srv6_sid_manager/rt6/bgpd.conf
index fe82feece4..c36fae7901 100644
--- a/tests/topotests/srv6_sid_manager/rt6/bgpd.conf
+++ b/tests/topotests/srv6_sid_manager/rt6/bgpd.conf
@@ -6,7 +6,6 @@ hostname rt6
password zebra
!
log stdout notifications
-log monitor notifications
log commands
!
!debug bgp neighbor-events
diff --git a/tests/topotests/zebra_seg6local_route/r1/routes.json b/tests/topotests/zebra_seg6local_route/r1/routes.json
index e391922566..7dcc6450fa 100644
--- a/tests/topotests/zebra_seg6local_route/r1/routes.json
+++ b/tests/topotests/zebra_seg6local_route/r1/routes.json
@@ -119,5 +119,78 @@
}]
}],
"required_kernel": "5.14"
+ },
+ {
+ "in": {
+ "dest": "6::1",
+ "context": "End_DX6 2001::1"
+ },
+ "out":[{
+ "prefix":"6::1/128",
+ "protocol":"sharp",
+ "selected":true,
+ "destSelected":true,
+ "distance":150,
+ "metric":0,
+ "installed":true,
+ "table":254,
+ "nexthops":[{
+ "flags":3,
+ "fib":true,
+ "active":true,
+ "directlyConnected":true,
+ "interfaceName": "dum0",
+ "seg6local": { "action": "End.DX6" }
+ }]
+ }]
+ },
+ {
+ "in": {
+ "dest": "7::1",
+ "context": "End_DT4 10"
+ },
+ "out":[{
+ "prefix":"7::1/128",
+ "protocol":"sharp",
+ "selected":true,
+ "destSelected":true,
+ "distance":150,
+ "metric":0,
+ "installed":true,
+ "table":254,
+ "nexthops":[{
+ "flags":3,
+ "fib":true,
+ "active":true,
+ "directlyConnected":true,
+ "interfaceName": "dum0",
+ "seg6local": { "action": "End.DT4" }
+ }]
+ }],
+ "required_kernel": "5.11"
+ },
+ {
+ "in": {
+ "dest": "8::1",
+ "context": "End_DT6 10"
+ },
+ "out":[{
+ "prefix":"8::1/128",
+ "protocol":"sharp",
+ "selected":true,
+ "destSelected":true,
+ "distance":150,
+ "metric":0,
+ "installed":true,
+ "table":254,
+ "nexthops":[{
+ "flags":3,
+ "fib":true,
+ "active":true,
+ "directlyConnected":true,
+ "interfaceName": "dum0",
+ "seg6local": { "action": "End.DT6" }
+ }]
+ }]
}
]
diff --git a/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py b/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py
index a90f5c9c98..59c681df48 100755
--- a/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py
+++ b/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py
@@ -42,7 +42,7 @@ def setup_module(mod):
tgen = Topogen({None: "r1"}, mod.__name__)
tgen.start_topology()
router_list = tgen.routers()
- for rname, router in tgen.routers().items():
+ for rname, router in router_list.items():
router.run(
"/bin/bash {}".format(os.path.join(CWD, "{}/setup.sh".format(rname)))
)