diff options
Diffstat (limited to 'tests')
22 files changed, 164 insertions, 38 deletions
diff --git a/tests/isisd/test_topologies.c b/tests/isisd/test_topologies.c index ca103948f3..b3e500a33c 100644 --- a/tests/isisd/test_topologies.c +++ b/tests/isisd/test_topologies.c @@ -31,7 +31,7 @@ * - The Router-ID is 10.0.255.X, where X is the node number; * - The default link metric is 10; * - When SR is enabled, Adj-SIDs and Prefix-SIDs are generated automatically; - * - When SR is enabled, the default SRGB is [16000-23999] (can be overriden). + * - When SR is enabled, the default SRGB is [16000-23999] (can be overridden). * * Test topology 1: * ================ diff --git a/tests/lib/test_table.c b/tests/lib/test_table.c index 9b6539e3bc..cef93ad0c5 100644 --- a/tests/lib/test_table.c +++ b/tests/lib/test_table.c @@ -382,7 +382,7 @@ static void verify_prefix_iter_cmp(const char *p1, const char *p2, assert(exp_result == result); /* - * Also check the reverse comparision. + * Also check the reverse comparison. */ result = route_table_prefix_iter_cmp((struct prefix *)&p2_pfx, (struct prefix *)&p1_pfx); @@ -398,7 +398,7 @@ static void verify_prefix_iter_cmp(const char *p1, const char *p2, /* * test_prefix_iter_cmp * - * Tests comparision of prefixes according to order of iteration. + * Tests comparison of prefixes according to order of iteration. */ static void test_prefix_iter_cmp(void) { diff --git a/tests/topotests/bgp_auth/test_bgp_auth.py b/tests/topotests/bgp_auth/test_bgp_auth.py index f01c7f206a..9e8136c17b 100644 --- a/tests/topotests/bgp_auth/test_bgp_auth.py +++ b/tests/topotests/bgp_auth/test_bgp_auth.py @@ -158,7 +158,7 @@ def setup_module(mod): # This is a sample of configuration loading. router_list = tgen.routers() - # For all registred routers, load the zebra configuration file + # For all registered routers, load the zebra configuration file for rname, router in router_list.items(): router.load_config(TopoRouter.RD_ZEBRA, "zebra.conf") router.load_config(TopoRouter.RD_OSPF) diff --git a/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py b/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py index 600bf3adc0..b18e32f6bd 100644 --- a/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py +++ b/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py @@ -371,7 +371,7 @@ def test_bgp_timers_functionality(request): # Creating configuration from JSON reset_config_on_routers(tgen) - # Api call to modfiy BGP timerse + # Api call to modify BGP timerse input_dict = { "r1": { "bgp": { diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py b/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py index c594079d4f..86a8751621 100755 --- a/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py +++ b/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py @@ -192,7 +192,7 @@ def setup_module(mod): pe.cmd_raises("sysctl -w net.ipv4.udp_l3mdev_accept={}".format(l3mdev_accept)) pe.cmd_raises("sysctl -w net.ipv4.tcp_l3mdev_accept={}".format(l3mdev_accept)) - # For all registred routers, load the zebra configuration file + # For all registered routers, load the zebra configuration file for (name, router) in tgen.routers().items(): router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(name)) diff --git a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py index 40972d4a6a..5d0a326afb 100755 --- a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py +++ b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py @@ -118,7 +118,7 @@ def setup_module(mod): # This is a sample of configuration loading. router_list = tgen.routers() - # For all registred routers, load the zebra configuration file + # For all registered routers, load the zebra configuration file for rname, router in router_list.items(): router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) diff --git a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-3.py b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-3.py index a5c833dc5d..e60552ed10 100644 --- a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-3.py +++ b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-3.py @@ -1041,7 +1041,7 @@ def test_BGP_GR_15_p2(request): logger.info( "[Step 2] : Test Setup " "[Helper Mode]R6-----R1[Restart Mode]" - "--------R2[Helper Mode] Initilized" + "--------R2[Helper Mode] Initialized" ) # Configure graceful-restart diff --git a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-4.py b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-4.py index 8671a79323..1df77ebeb2 100644 --- a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-4.py +++ b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2-4.py @@ -456,7 +456,7 @@ def test_BGP_GR_20_p1(request): reset_config_on_routers(tgen) logger.info( - "[Step 1] : Test Setup " "[Restart Mode]R3-----R1[Restart Mode] Initilized" + "[Step 1] : Test Setup " "[Restart Mode]R3-----R1[Restart Mode] Initialized" ) # Configure graceful-restart @@ -602,7 +602,7 @@ def test_BGP_GR_21_p2(request): reset_config_on_routers(tgen) logger.info( - "[Step 1] : Test Setup " "[Helper Mode]R6-----R1[Restart Mode] Initilized" + "[Step 1] : Test Setup " "[Helper Mode]R6-----R1[Restart Mode] Initialized" ) # Configure graceful-restart @@ -676,7 +676,7 @@ def test_BGP_GR_21_p2(request): logger.info( "[Step 2] : Test Setup " "[Restart Mode]R2-----[Helper Mode]R1[Disable Mode]" - "--------R6[Helper Mode] Initilized" + "--------R6[Helper Mode] Initialized" ) # Configure graceful-restart @@ -821,7 +821,7 @@ def test_BGP_GR_22_p2(request): reset_config_on_routers(tgen) logger.info( - "[Step 1] : Test Setup " "[Helper Mode]R3-----R1[Restart Mode] Initilized" + "[Step 1] : Test Setup " "[Helper Mode]R3-----R1[Restart Mode] Initialized" ) # Configure graceful-restart @@ -901,7 +901,7 @@ def test_BGP_GR_22_p2(request): logger.info( "[Step 2] : Test Setup " "[Restart Mode]R2-----[Helper Mode]R1[Disable Mode]" - "--------R3[Helper Mode] Initilized" + "--------R3[Helper Mode] Initialized" ) # Configure graceful-restart diff --git a/tests/topotests/bgp_lu_topo1/test_bgp_lu.py b/tests/topotests/bgp_lu_topo1/test_bgp_lu.py index 8941854593..8955f2794d 100644 --- a/tests/topotests/bgp_lu_topo1/test_bgp_lu.py +++ b/tests/topotests/bgp_lu_topo1/test_bgp_lu.py @@ -92,7 +92,7 @@ def setup_module(mod): # This is a sample of configuration loading. router_list = tgen.routers() - # For all registred routers, load the zebra configuration file + # For all registered routers, load the zebra configuration file for rname, router in router_list.items(): router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py index 35e81d1c62..04ebe61a02 100644 --- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py +++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py @@ -1224,7 +1224,7 @@ def test_shut_noshut_p1(request): result = create_router_bgp(tgen, topo, input_dict_3) assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) - step("Api call to modfiy BGP timers") + step("Api call to modify BGP timers") input_dict_4 = { "r1": { @@ -1757,7 +1757,7 @@ def test_vrf_vlan_routing_table_p1(request): tc_name, result ) - step("Api call to modfiy BGP timers") + step("Api call to modify BGP timers") input_dict_4 = { "r3": { @@ -2422,7 +2422,7 @@ def test_delete_and_re_add_vrf_p1(request): result = verify_rib(tgen, addr_type, dut, input_dict_2) assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result) - step("Api call to modfiy BGP timers") + step("Api call to modify BGP timers") input_dict_4 = { "r1": { @@ -3034,7 +3034,7 @@ def test_vrf_name_significance_p1(request): result = verify_rib(tgen, addr_type, dut, input_dict_4) assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result) - step("Api call to modfiy BGP timers") + step("Api call to modify BGP timers") input_dict_4 = { "r3": { @@ -3437,7 +3437,7 @@ def test_vrf_name_significance_p1(request): result = create_router_bgp(tgen, topo_modify["routers"]) assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) - step("Api call to modfiy BGP timers") + step("Api call to modify BGP timers") input_dict_4 = { "r3": { diff --git a/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py b/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py index 0d27474cbd..d612ad2c94 100755 --- a/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py +++ b/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py @@ -154,7 +154,7 @@ def setup_module(mod): router_list = tgen.routers() - # For all registred routers, load the zebra configuration file + # For all registered routers, load the zebra configuration file for rname, router in router_list.items(): router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) diff --git a/tests/topotests/grpc_basic/test_basic_grpc.py b/tests/topotests/grpc_basic/test_basic_grpc.py index b6812a5afc..6bd0be9fd9 100644 --- a/tests/topotests/grpc_basic/test_basic_grpc.py +++ b/tests/topotests/grpc_basic/test_basic_grpc.py @@ -122,7 +122,7 @@ def test_get_config(tgen): nrepeat = 5 r1 = tgen.gears["r1"] - step("'GET' inteface config 10 times, once per invocation") + step("'GET' interface config 10 times, once per invocation") for i in range(0, nrepeat): output = run_grpc_client(r1, GRPCP_ZEBRA, "GET,/frr-interface:lib") diff --git a/tests/topotests/lib/ltemplate.py b/tests/topotests/lib/ltemplate.py index 18882285ed..2544023c43 100644 --- a/tests/topotests/lib/ltemplate.py +++ b/tests/topotests/lib/ltemplate.py @@ -93,7 +93,7 @@ class LTemplate: # This is a sample of configuration loading. router_list = tgen.routers() - # For all registred routers, load the zebra configuration file + # For all registered routers, load the zebra configuration file for rname, router in router_list.items(): logger.info("Setting up %s" % rname) for rd_val in TopoRouter.RD: diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 4ed5b2f825..c04506f47e 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -443,7 +443,7 @@ class Topogen(object): def start_router(self, router=None): """ Call the router startRouter method. - If no router is specified it is called for all registred routers. + If no router is specified it is called for all registered routers. """ if router is None: # pylint: disable=r1704 diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index e786ae02cd..27b566a8f5 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -746,7 +746,7 @@ def proto_name_to_number(protocol): def ip4_route(node): """ Gets a structured return of the command 'ip route'. It can be used in - conjuction with json_cmp() to provide accurate assert explanations. + conjunction with json_cmp() to provide accurate assert explanations. Return example: { @@ -787,7 +787,7 @@ def ip4_route(node): def ip4_vrf_route(node): """ Gets a structured return of the command 'ip route show vrf {0}-cust1'. - It can be used in conjuction with json_cmp() to provide accurate assert explanations. + It can be used in conjunction with json_cmp() to provide accurate assert explanations. Return example: { @@ -831,7 +831,7 @@ def ip4_vrf_route(node): def ip6_route(node): """ Gets a structured return of the command 'ip -6 route'. It can be used in - conjuction with json_cmp() to provide accurate assert explanations. + conjunction with json_cmp() to provide accurate assert explanations. Return example: { @@ -871,7 +871,7 @@ def ip6_route(node): def ip6_vrf_route(node): """ Gets a structured return of the command 'ip -6 route show vrf {0}-cust1'. - It can be used in conjuction with json_cmp() to provide accurate assert explanations. + It can be used in conjunction with json_cmp() to provide accurate assert explanations. Return example: { @@ -913,7 +913,7 @@ def ip6_vrf_route(node): def ip_rules(node): """ Gets a structured return of the command 'ip rule'. It can be used in - conjuction with json_cmp() to provide accurate assert explanations. + conjunction with json_cmp() to provide accurate assert explanations. Return example: [ diff --git a/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py b/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py index 1a55d6d9f1..1762535cee 100644 --- a/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py +++ b/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py @@ -34,7 +34,7 @@ Tests covered in this suite 3.2 Verify if no forwarding bit is set , FRR is not forwarding the BSM to other PIM nbrs 3.3 Verify multicast BSM is sent to new router when unicast BSM is disabled -4.1 Verfiy BSM arrived on non bsm capable interface is dropped and +4.1 Verify BSM arrived on non bsm capable interface is dropped and not processed 4.2 Verify group to RP info updated correctly in FRR node, after shut and no-shut of BSM enable interfaces @@ -865,7 +865,7 @@ def test_new_router_fwd_p0(request): def test_int_bsm_config_p1(request): """ - 1. Verfiy BSM arrived on non bsm capable interface is dropped and + 1. Verify BSM arrived on non bsm capable interface is dropped and not processed 2. Verify group to RP info updated correctly in FRR node, after shut and no-shut of BSM enable interfaces diff --git a/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py b/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py index 210f960b60..b9a7cc7cd7 100755 --- a/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py +++ b/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py @@ -69,7 +69,7 @@ TC_18 : Verify RPF interface updated in mroute when higher preferred RP gets deleted TC_19 : Verify IIF and OIL in "show ip pim state" updated when higher preferred overlapping RP is deleted -TC_20 : Verfiy PIM upstream IIF updated when higher preferred overlapping RP +TC_20 : Verify PIM upstream IIF updated when higher preferred overlapping RP deleted TC_21_1 : Verify OIF and RFP for (*,G) and (S,G) when static RP configure in LHR router @@ -94,7 +94,7 @@ TC_30 : Verify IIF and OIL change to other path after shut the primary path TC_31 : Verify RP info and (*,G) mroute after deleting the RP and shut / no shut the RPF interface. TC_32 : Verify RP info and (*,G) mroute after deleting the RP and shut / no - shut the RPF inteface + shut the RPF interface """ import os @@ -1157,7 +1157,7 @@ def test_send_join_on_higher_preffered_rp_p1(request): gets deleted TC_19_P1 : Verify IIF and OIL in "show ip pim state" updated when higher preferred overlapping RP is deleted - TC_20_P1 : Verfiy PIM upstream IIF updated when higher preferred + TC_20_P1 : Verify PIM upstream IIF updated when higher preferred overlapping RP deleted Topology used: @@ -1354,7 +1354,7 @@ def test_send_join_on_higher_preffered_rp_p1(request): assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) step( - "r1 : Verfiy upstream IIF updated when higher preferred overlapping" + "r1 : Verify upstream IIF updated when higher preferred overlapping" "RP deleted" ) result = verify_upstream_iif(tgen, dut, iif, STAR, GROUP_ADDRESS) @@ -3820,7 +3820,7 @@ def test_delete_RP_shut_noshut_upstream_interface_p1(request): def test_delete_RP_shut_noshut_RP_interface_p1(request): """ TC_32_P1: Verify RP info and (*,G) mroute after deleting the RP and shut/ - no shut the RPF inteface + no shut the RPF interface Topology used: ________r2_____ diff --git a/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py b/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py index 01ddbc1521..5903649d67 100644 --- a/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py +++ b/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py @@ -79,7 +79,7 @@ def setup_module(mod): # This is a sample of configuration loading. router_list = tgen.routers() - # For all registred routers, load the zebra and ospf configuration file + # For all registered routers, load the zebra and ospf configuration file for rname, router in router_list.items(): router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) diff --git a/tests/topotests/simple_snmp_test/test_simple_snmp.py b/tests/topotests/simple_snmp_test/test_simple_snmp.py index 35f0210134..1ca06c6571 100755 --- a/tests/topotests/simple_snmp_test/test_simple_snmp.py +++ b/tests/topotests/simple_snmp_test/test_simple_snmp.py @@ -69,7 +69,7 @@ def setup_module(mod): router_list = tgen.routers() - # For all registred routers, load the zebra configuration file + # For all registered routers, load the zebra configuration file for rname, router in router_list.items(): router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py index 8c97d6cb7e..d5e5148eae 100644 --- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py +++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py @@ -175,7 +175,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ibgp(request): ) for addr_type in ADDR_TYPES: - # Api call to modfiy BGP timerse + # Api call to modify BGP timerse input_dict = { "r2": { "bgp": { diff --git a/tests/topotests/zebra_multiple_connected/r1/ip_route2.json b/tests/topotests/zebra_multiple_connected/r1/ip_route2.json new file mode 100644 index 0000000000..26995654f7 --- /dev/null +++ b/tests/topotests/zebra_multiple_connected/r1/ip_route2.json @@ -0,0 +1,102 @@ +{ + "10.0.1.0/24":[ + { + "prefix":"10.0.1.0/24", + "prefixLen":24, + "protocol":"connected", + "vrfName":"default", + "distance":0, + "metric":0, + "installed":true, + "table":254, + "nexthops":[ + { + "fib":true, + "directlyConnected":true, + "interfaceName":"r1-eth1", + "active":true + } + ] + }, + { + "prefix":"10.0.1.0/24", + "prefixLen":24, + "protocol":"connected", + "vrfName":"default", + "distance":0, + "metric":0, + "installed":true, + "table":254, + "nexthops":[ + { + "fib":true, + "directlyConnected":true, + "interfaceName":"r1-eth0", + "active":true + } + ] + } + ], + "10.0.1.30/32":[ + { + "prefix":"10.0.1.30/32", + "prefixLen":32, + "protocol":"kernel", + "vrfName":"default", + "distance":0, + "metric":0, + "installed":true, + "table":254, + "nexthops":[ + { + "fib":true, + "directlyConnected":true, + "interfaceName":"r1-eth1", + "active":true + } + ] + } + ], + "10.9.9.0/24":[ + { + "prefix":"10.9.9.0/24", + "prefixLen":24, + "protocol":"kernel", + "vrfName":"default", + "distance":0, + "metric":0, + "installed":true, + "table":254, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.30", + "afi":"ipv4", + "interfaceName":"r1-eth1", + "active":true + } + ] + } + ], + "192.168.1.1/32":[ + { + "prefix":"192.168.1.1/32", + "prefixLen":32, + "protocol":"kernel", + "vrfName":"default", + "distance":0, + "metric":0, + "installed":true, + "table":254, + "nexthops":[ + { + "fib":true, + "ip":"10.0.1.99", + "afi":"ipv4", + "interfaceName":"r1-eth1", + "active":true + } + ] + } + ] +} diff --git a/tests/topotests/zebra_multiple_connected/test_zebra_multiple_connected.py b/tests/topotests/zebra_multiple_connected/test_zebra_multiple_connected.py index 31ac831b35..8882cf5bda 100644 --- a/tests/topotests/zebra_multiple_connected/test_zebra_multiple_connected.py +++ b/tests/topotests/zebra_multiple_connected/test_zebra_multiple_connected.py @@ -133,6 +133,30 @@ def test_zebra_connected_multiple(): assert result is None, "Kernel route is missing from zebra" +def test_zebra_system_recursion(): + "Test a system route recursing through another system route" + + tgen = get_topogen() + if tgen.routers_have_failure(): + pytest.skip(tgen.errors) + + router = tgen.gears["r1"] + router.run("ip route add 10.0.1.30/32 dev r1-eth1") + router.run("ip route add 10.9.9.0/24 via 10.0.1.30 dev r1-eth1") + router.run("ip link add dummy2 type dummy") + router.run("ip link set dummy2 up") + router.run("ip link set dummy2 down") + + routes = "{}/{}/ip_route2.json".format(CWD, router.name) + expected = json.loads(open(routes).read()) + test_func = partial( + topotest.router_json_cmp, router, "show ip route json", expected + ) + + _, result = topotest.run_and_expect(test_func, None, count=20, wait=1) + assert result is None, "Kernel route is missing from zebra" + + if __name__ == "__main__": args = ["-s"] + sys.argv[1:] sys.exit(pytest.main(args)) |
