Skip to content

Commit d9fa13b

Browse files
committed
Merge branch '202411' of https://github.com/sonic-net/sonic-mgmt into 202412
2 parents fdf5f69 + e758401 commit d9fa13b

File tree

4 files changed

+32
-40
lines changed

4 files changed

+32
-40
lines changed

tests/arp/test_arp_dualtor.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,14 @@ def pause_arp_update(duthosts):
6363

6464

6565
@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."""
7268
ip_version = request.param
7369
selected_intf = random.choice(list(mux_config.values()))
7470
neigh_ip = ip_interface(selected_intf["SERVER"][ip_version]).ip
71+
cable_type = selected_intf["SERVER"].get("cable_type", "active-standby")
7572
logger.info("Using {} as neighbor IP".format(neigh_ip))
76-
return neigh_ip
73+
return selected_intf, neigh_ip, cable_type
7774

7875

7976
@pytest.fixture
@@ -135,7 +132,7 @@ def test_proxy_arp_for_standby_neighbor(proxy_arp_enabled, ip_and_intf_info, res
135132

136133

137134
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
139136
toggle_all_simulator_ports_to_rand_selected_tor, rand_selected_dut, rand_unselected_dut # noqa F811
140137
):
141138
"""
@@ -149,6 +146,11 @@ def test_arp_update_for_failed_standby_neighbor(
149146
4. Run `arp_update` on the active ToR
150147
5. Verify the incomplete entry is now reachable
151148
"""
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+
152154
if ip_address(neighbor_ip).version == 6 and rand_unselected_dut.facts["asic_type"] == "vs":
153155
pytest.skip("Temporarily skipped to let the sonic-swss submodule be updated.")
154156
# 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(
181183

182184

183185
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
186189
):
187190
"""
188191
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(
192195
2. Run arp_update on the active ToR
193196
3. Confirm that the standby ToR learned the entry and it is REACHABLE
194197
"""
198+
neighbor_ip = selected_mux_port[1]
195199
if ip_address(neighbor_ip).version == 6 and rand_unselected_dut.facts["asic_type"] == "vs":
196200
pytest.skip("Temporarily skipped to let the sonic-swss submodule be updated.")
197201
ping_cmd = "timeout 0.2 ping -c1 -W1 -i0.2 -n -q {}".format(neighbor_ip)

tests/common/plugins/conditional_mark/tests_mark_conditions.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,10 @@ hash/test_generic_hash.py::test_nexthop_flap:
12581258
- "asic_gen == 'spc1'"
12591259
- "asic_type in ['broadcom']"
12601260
- https://github.com/sonic-net/sonic-mgmt/issues/13919
1261+
xfail:
1262+
reason: "Flaky hashing behavior using specific combination of hash field and algorithm."
1263+
conditions:
1264+
- "'isolated' in topo_name"
12611265

12621266
hash/test_generic_hash.py::test_nexthop_flap[CRC-INNER_IP_PROTOCOL:
12631267
skip:
@@ -1686,11 +1690,7 @@ pfcwd/test_pfcwd_warm_reboot.py:
16861690
- "topo_type in ['m0', 'mx']"
16871691
- "release in ['202412']"
16881692
- "asic_type in ['cisco-8000']"
1689-
xfail:
1690-
reason: "Warm Reboot is not supported in dualtor and has a known issue on 202305 branch"
1691-
conditions:
1692-
- "'dualtor' in topo_name"
1693-
- https://github.com/sonic-net/sonic-mgmt/issues/8400
1693+
- "'dualtor' in topo_name and https://github.com/sonic-net/sonic-mgmt/issues/8400"
16941694

16951695
pfcwd/test_pfcwd_warm_reboot.py::TestPfcwdWb::test_pfcwd_wb[async_storm:
16961696
skip:

tests/qos/test_tunnel_qos_remap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
dut_config, qos_config, tunnel_qos_maps, run_ptf_test, toggle_mux_to_host,\
3030
setup_module, update_docker_services, swap_syncd, counter_poll_config # noqa F401
3131
from .tunnel_qos_remap_base import leaf_fanout_peer_info, start_pfc_storm, \
32-
stop_pfc_storm, get_queue_counter, get_queue_watermark, disable_packet_aging # noqa F401
32+
stop_pfc_storm, get_queue_counter, get_queue_watermark # noqa F401
3333
from ptf import testutils
3434
from ptf.testutils import simple_tcp_packet
3535
from tests.common.fixtures.conn_graph_facts import conn_graph_facts, fanout_graph_facts # noqa F401

tests/qos/tunnel_qos_remap_base.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -316,30 +316,6 @@ def qos_config(rand_selected_dut, tbinfo, dut_config):
316316
return speed_cable_to_params[speed_cable]
317317

318318

319-
@pytest.fixture(scope='module', autouse=True)
320-
def disable_packet_aging(rand_selected_dut, duthosts):
321-
"""
322-
For Nvidia(Mellanox) platforms, packets in buffer will be aged after a timeout. Need to disable this
323-
before any buffer tests.
324-
"""
325-
for duthost in duthosts:
326-
asic = duthost.get_asic_name()
327-
if 'spc' in asic:
328-
logger.info("Disable Mellanox packet aging")
329-
duthost.copy(src="qos/files/mellanox/packets_aging.py", dest="/tmp")
330-
duthost.command("docker cp /tmp/packets_aging.py syncd:/")
331-
duthost.command("docker exec syncd python /packets_aging.py disable")
332-
333-
yield
334-
335-
for duthost in duthosts:
336-
asic = duthost.get_asic_name()
337-
if 'spc' in asic:
338-
logger.info("Enable Mellanox packet aging")
339-
duthost.command("docker exec syncd python /packets_aging.py enable")
340-
duthost.command("docker exec syncd rm -rf /packets_aging.py")
341-
342-
343319
def _create_ssh_tunnel_to_syncd_rpc(duthost):
344320
dut_asic = duthost.asic_instance()
345321
dut_asic.create_ssh_tunnel_sai_rpc()
@@ -400,13 +376,25 @@ def update_docker_services(rand_selected_dut, swap_syncd, disable_container_auto
400376
for service in SERVICES:
401377
_update_docker_service(rand_selected_dut, action="stop", **service)
402378

379+
asic = rand_selected_dut.get_asic_name()
380+
if 'spc' in asic:
381+
logger.info("Disable Mellanox packet aging")
382+
rand_selected_dut.copy(src="qos/files/mellanox/packets_aging.py", dest="/tmp")
383+
rand_selected_dut.command("docker cp /tmp/packets_aging.py syncd:/")
384+
rand_selected_dut.command("docker exec syncd python /packets_aging.py disable")
385+
403386
yield
404387

405388
enable_container_autorestart(
406389
rand_selected_dut, testcase="test_tunnel_qos_remap", feature_list=feature_list)
407390
for service in SERVICES:
408391
_update_docker_service(rand_selected_dut, action="start", **service)
409392

393+
if 'spc' in asic:
394+
logger.info("Enable Mellanox packet aging")
395+
rand_selected_dut.command("docker exec syncd python /packets_aging.py enable")
396+
rand_selected_dut.command("docker exec syncd rm -rf /packets_aging.py")
397+
410398

411399
def _update_mux_feature(duthost, state):
412400
cmd = "sudo config feature state mux {}".format(state)

0 commit comments

Comments
 (0)