@@ -63,17 +63,14 @@ def pause_arp_update(duthosts):
63
63
64
64
65
65
@pytest .fixture (params = ['IPv4' , 'IPv6' ])
66
- def neighbor_ip (request , mux_config ): # noqa F811
67
- """
68
- Provide the neighbor IP used for testing
69
-
70
- Randomly select an IP from the server IPs configured in the config DB MUX_CABLE table
71
- """
66
+ def selected_mux_port (request , mux_config ): # noqa F811
67
+ """Randomly select a mux port for testing."""
72
68
ip_version = request .param
73
69
selected_intf = random .choice (list (mux_config .values ()))
74
70
neigh_ip = ip_interface (selected_intf ["SERVER" ][ip_version ]).ip
71
+ cable_type = selected_intf ["SERVER" ].get ("cable_type" , "active-standby" )
75
72
logger .info ("Using {} as neighbor IP" .format (neigh_ip ))
76
- return neigh_ip
73
+ return selected_intf , neigh_ip , cable_type
77
74
78
75
79
76
@pytest .fixture
@@ -135,7 +132,7 @@ def test_proxy_arp_for_standby_neighbor(proxy_arp_enabled, ip_and_intf_info, res
135
132
136
133
137
134
def test_arp_update_for_failed_standby_neighbor (
138
- config_dualtor_arp_responder , neighbor_ip , clear_neighbor_table , # noqa F811
135
+ config_dualtor_arp_responder , selected_mux_port , clear_neighbor_table , # noqa F811
139
136
toggle_all_simulator_ports_to_rand_selected_tor , rand_selected_dut , rand_unselected_dut # noqa F811
140
137
):
141
138
"""
@@ -149,6 +146,11 @@ def test_arp_update_for_failed_standby_neighbor(
149
146
4. Run `arp_update` on the active ToR
150
147
5. Verify the incomplete entry is now reachable
151
148
"""
149
+ _ , neighbor_ip , cable_type = selected_mux_port
150
+
151
+ if cable_type == "active-active" :
152
+ pytest .skip ("Skip as the testcase is designed for active-standby mux port." )
153
+
152
154
if ip_address (neighbor_ip ).version == 6 and rand_unselected_dut .facts ["asic_type" ] == "vs" :
153
155
pytest .skip ("Temporarily skipped to let the sonic-swss submodule be updated." )
154
156
# We only use ping to trigger an ARP request from the kernel, so exit early to save time
@@ -181,8 +183,9 @@ def test_arp_update_for_failed_standby_neighbor(
181
183
182
184
183
185
def test_standby_unsolicited_neigh_learning (
184
- config_dualtor_arp_responder , neighbor_ip , clear_neighbor_table , # noqa F811
185
- toggle_all_simulator_ports_to_rand_selected_tor , rand_selected_dut , rand_unselected_dut # noqa F811
186
+ config_dualtor_arp_responder , selected_mux_port , clear_neighbor_table , # noqa F811
187
+ toggle_all_simulator_ports_to_rand_selected_tor , rand_selected_dut , rand_unselected_dut , # noqa F811
188
+ setup_standby_ports_on_rand_unselected_tor # noqa F811
186
189
):
187
190
"""
188
191
Test the standby ToR's ability to perform unsolicited neighbor learning (GARP and unsolicited NA)
@@ -192,6 +195,7 @@ def test_standby_unsolicited_neigh_learning(
192
195
2. Run arp_update on the active ToR
193
196
3. Confirm that the standby ToR learned the entry and it is REACHABLE
194
197
"""
198
+ neighbor_ip = selected_mux_port [1 ]
195
199
if ip_address (neighbor_ip ).version == 6 and rand_unselected_dut .facts ["asic_type" ] == "vs" :
196
200
pytest .skip ("Temporarily skipped to let the sonic-swss submodule be updated." )
197
201
ping_cmd = "timeout 0.2 ping -c1 -W1 -i0.2 -n -q {}" .format (neighbor_ip )
0 commit comments