summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/topotests/lib/common_config.py20
-rwxr-xr-xtests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py18
-rwxr-xr-xtests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py39
3 files changed, 42 insertions, 35 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index 676a5704e5..8ed37d1a82 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -81,6 +81,26 @@ DEBUG_LOGS = {
"debug pim packets register",
"debug pim nht",
],
+ "pim6d": [
+ "debug pimv6 events",
+ "debug pimv6 packets",
+ "debug pimv6 packet-dump send",
+ "debug pimv6 packet-dump receive",
+ "debug pimv6 trace",
+ "debug pimv6 trace detail",
+ "debug pimv6 zebra",
+ "debug pimv6 bsm",
+ "debug pimv6 packets hello",
+ "debug pimv6 packets joins",
+ "debug pimv6 packets register",
+ "debug pimv6 nht",
+ "debug pimv6 nht detail",
+ "debug mroute6",
+ "debug mroute6 detail",
+ "debug mld events",
+ "debug mld packets",
+ "debug mld trace",
+ ],
"bgpd": [
"debug bgp neighbor-events",
"debug bgp updates",
diff --git a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py
index 285f0dcebc..a6f876f066 100755
--- a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py
+++ b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py
@@ -268,9 +268,6 @@ def test_pim6_add_delete_static_RP_p0(request):
check_router_status(tgen)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Shut link b/w R1 and R3 and R1 and R4 as per testcase topology")
@@ -468,9 +465,6 @@ def test_pim6_SPT_RPT_path_same_p1(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Shut link b/w R1->R3, R1->R4 and R3->R1, R3->R4 as per " "testcase topology")
@@ -644,9 +638,6 @@ def test_pim6_RP_configured_as_LHR_p1(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Enable MLD on r1 interface")
@@ -779,9 +770,6 @@ def test_pim6_RP_configured_as_FHR_p1(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Enable MLD on r1 interface")
@@ -910,9 +898,6 @@ def test_pim6_SPT_RPT_path_different_p1(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Enable MLD on r1 interface")
@@ -1083,9 +1068,6 @@ def test_pim6_send_join_on_higher_preffered_rp_p1(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Enable MLD on r1 interface")
diff --git a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py
index 6113635783..b615b9b824 100755
--- a/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py
+++ b/tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py
@@ -75,6 +75,7 @@ from lib.common_config import (
socat_send_mld_join,
socat_send_pim6_traffic,
kill_socat,
+ create_debug_log_config,
)
from lib.pim import (
create_pim_config,
@@ -272,11 +273,17 @@ def test_pim6_multiple_groups_same_RP_address_p2(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
+ input_dict = {
+ "r1": {"debug": {"log_file": "r1_debug.log", "enable": ["pim6d"]}},
+ "r2": {"debug": {"log_file": "r2_debug.log", "enable": ["pim6d"]}},
+ "r3": {"debug": {"log_file": "r3_debug.log", "enable": ["pim6d"]}},
+ "r4": {"debug": {"log_file": "r4_debug.log", "enable": ["pim6d"]}},
+ }
+
+ result = create_debug_log_config(tgen, input_dict)
+
step("Enable MLD on r1 interface")
step("Enable the PIM6 on all the interfaces of r1, r2, r3 and r4 routers")
step("r2: Configure r2 as RP")
@@ -594,9 +601,6 @@ def test_pim6_multiple_groups_different_RP_address_p2(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Enable MLD on r1 interface")
@@ -673,17 +677,21 @@ def test_pim6_multiple_groups_different_RP_address_p2(request):
step("r1: Verify (*, G) upstream IIF interface")
dut = "r1"
- iif = TOPO["routers"]["r1"]["links"]["r2"]["interface"]
- result = verify_upstream_iif(tgen, dut, iif, STAR, group_address_list)
- assert result is True, ASSERT_MSG.format(tc_name, result)
+ iif1 = TOPO["routers"]["r1"]["links"]["r2"]["interface"]
+ iif2 = TOPO["routers"]["r1"]["links"]["r4"]["interface"]
- step("r1: Verify (*, G) upstream join state and join timer")
- result = verify_join_state_and_timer(
- tgen, dut, iif, STAR, group_address_list, addr_type="ipv6"
- )
- assert result is True, ASSERT_MSG.format(tc_name, result)
+ for _iif, _group in zip([iif1, iif2], [GROUP_ADDRESS_LIST_1, GROUP_ADDRESS_LIST_2]):
+ result = verify_upstream_iif(tgen, dut, _iif, STAR, _group)
+ assert result is True, ASSERT_MSG.format(tc_name, result)
+
+ step("r1: Verify (*, G) upstream join state and join timer")
+ result = verify_join_state_and_timer(
+ tgen, dut, _iif, STAR, _group, addr_type="ipv6"
+ )
+ assert result is True, ASSERT_MSG.format(tc_name, result)
step("r1: Verify (*, G) ip mroutes")
+ iif = TOPO["routers"]["r1"]["links"]["r2"]["interface"]
oif = TOPO["routers"]["r1"]["links"]["r0"]["interface"]
result = verify_mroutes(tgen, dut, STAR, GROUP_ADDRESS_LIST_1, iif, oif)
assert result is True, ASSERT_MSG.format(tc_name, result)
@@ -1189,9 +1197,6 @@ def test_pim6_delete_RP_shut_noshut_upstream_interface_p1(request):
pytest.skip(tgen.errors)
step("Creating configuration from JSON")
- kill_socat(tgen)
- clear_pim6_mroute(tgen)
- clear_pim6_interface_traffic(tgen, TOPO)
reset_config_on_routers(tgen)
step("Enable MLD on r1 interface")