]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Fix for multicast_pim6_static_rp tests failure
authorKuldeep Kashyap <kashyapk@vmware.com>
Mon, 21 Nov 2022 07:47:33 +0000 (23:47 -0800)
committerKuldeep Kashyap <kashyapk@vmware.com>
Thu, 19 Jan 2023 13:26:37 +0000 (05:26 -0800)
Multicast pim6 static RP tests are failing
when run in parallel using micronet. There
are APIs to clean mcast traffic before
starting new test but these cleanups
are not needed when socat is used.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
tests/topotests/lib/common_config.py
tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp1.py
tests/topotests/multicast_pim6_static_rp_topo1/test_multicast_pim6_static_rp2.py

index 676a5704e5d362fceafd900233dee33fcf4a169a..8ed37d1a824849570f56da0f4009ee79f15361dc 100644 (file)
@@ -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",
index 285f0dcebc86a3e51a533fde82f7c7691c88cd5e..a6f876f066f4dc11f61f5488f98b5372d873e831 100755 (executable)
@@ -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")
index 6113635783e6196e3addeecd266184f39ca4248b..b615b9b824d3a477099df4599b4f76e1c7419970 100755 (executable)
@@ -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")