Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
dd152cb
example for PR
gshemesh2 May 28, 2025
9a35c5f
Merge branch 'sonic-net:master' into master
gshemesh2 May 28, 2025
8df4b25
Adding WA to for Port Error Test
gshemesh2 Jun 11, 2025
8045917
Merge branch 'sonic-net:master' into master
gshemesh2 Jun 11, 2025
72572a2
Update test_port_error.py
gshemesh2 Jun 11, 2025
dd22460
Update test_port_error.py
gshemesh2 Jun 16, 2025
e58fe89
Update test_port_error.py
gshemesh2 Jun 16, 2025
c263165
Update test_port_error.py
gshemesh2 Jun 16, 2025
50fa7e4
Update test_port_error.py
gshemesh2 Jun 16, 2025
e6e28ec
Update test_port_error.py
gshemesh2 Jun 17, 2025
b40aa2c
Update test_port_error.py
gshemesh2 Jun 17, 2025
51b1052
Update test_port_error.py
gshemesh2 Jun 18, 2025
81d7e2a
Update test_port_error.py
gshemesh2 Jul 2, 2025
a5fa257
Update code-review-guidlines.md
gshemesh2 Jul 2, 2025
7bf6710
Update test_port_error.py
gshemesh2 Jul 2, 2025
5d4a01f
Update test_port_error.py
gshemesh2 Jul 2, 2025
8cfa578
Update test_port_error.py
gshemesh2 Jul 2, 2025
1a67218
Update test_port_error.py
gshemesh2 Jul 2, 2025
4e115ca
Update test_port_error.py
gshemesh2 Jul 2, 2025
32663a4
Update test_port_error.py
gshemesh2 Jul 2, 2025
5710fca
Update test_port_error.py
gshemesh2 Jul 2, 2025
4916a68
Update test_port_error.py
gshemesh2 Jul 2, 2025
9c21be4
Update test_port_error.py
gshemesh2 Jul 2, 2025
8a7f377
Update test_port_error.py
gshemesh2 Jul 2, 2025
2a9fd16
Update test_port_error.py
gshemesh2 Jul 3, 2025
9cf53ff
Update test_port_error.py
gshemesh2 Jul 17, 2025
75d5d4a
Update test_port_error.py
gshemesh2 Jul 24, 2025
45087e2
Update test_port_error.py
gshemesh2 Jul 27, 2025
ca6f72b
Merge branch 'sonic-net:master' into master
gshemesh2 Aug 3, 2025
29079a7
Update transceiver_utils.py
gshemesh2 Aug 3, 2025
be36623
Update test_port_error.py
gshemesh2 Aug 3, 2025
bfc1e7e
Update test_port_error.py
gshemesh2 Aug 3, 2025
282f51a
Update test_port_error.py
gshemesh2 Aug 3, 2025
f4d44f2
Update transceiver_utils.py
gshemesh2 Aug 3, 2025
3e9ec46
Update test_port_error.py
gshemesh2 Aug 3, 2025
f108723
Update test_port_error.py
gshemesh2 Aug 4, 2025
3969754
Update test_port_error.py
gshemesh2 Aug 4, 2025
4bd0969
Update test_port_error.py
gshemesh2 Aug 25, 2025
682423c
Update conftest.py
gshemesh2 Aug 25, 2025
c83316e
Update test_port_error.py
gshemesh2 Aug 25, 2025
55418ca
Merge branch 'sonic-net:master' into master
gshemesh2 Sep 10, 2025
2a62fb0
Update test_crm.py
gshemesh2 Sep 10, 2025
fd7797f
Update conftest.py
gshemesh2 Sep 10, 2025
7a48b85
Update transceiver_utils.py
gshemesh2 Sep 10, 2025
ce20a69
Update test_crm.py
gshemesh2 Sep 10, 2025
5b87a65
Update conftest.py
gshemesh2 Sep 10, 2025
114e697
Update codeql-analysis.yml
gshemesh2 Sep 15, 2025
5c70806
Update transceiver_utils.py
gshemesh2 Sep 15, 2025
66ff827
Update test_port_error.py
gshemesh2 Sep 15, 2025
186a16d
Update conftest.py
gshemesh2 Sep 15, 2025
8c9a644
Update transceiver_utils.py
gshemesh2 Sep 15, 2025
e8e9bad
Update mellanox_data.py
gshemesh2 Sep 15, 2025
dd66ac3
Update test_port_error.py
gshemesh2 Sep 15, 2025
25b8511
Update mellanox_data.py
gshemesh2 Sep 15, 2025
dcb8920
Update transceiver_utils.py
gshemesh2 Sep 15, 2025
b74b177
Update mellanox_data.py
gshemesh2 Sep 15, 2025
646caed
Update mellanox_data.py
gshemesh2 Sep 15, 2025
70593bb
Update mellanox_data.py
gshemesh2 Sep 15, 2025
d7d17cd
Update test_port_error.py
gshemesh2 Sep 15, 2025
0275d07
Update mellanox_data.py
gshemesh2 Sep 15, 2025
307008d
Update conftest.py
gshemesh2 Sep 15, 2025
db16465
Update test_port_error.py
gshemesh2 Sep 15, 2025
db53d6a
Update mellanox_data.py
gshemesh2 Sep 15, 2025
1cdffd4
Update mellanox_data.py
gshemesh2 Sep 15, 2025
d544b08
Merge branch 'sonic-net:master' into master
gshemesh2 Sep 16, 2025
c444d94
Update test_port_error.py
gshemesh2 Sep 17, 2025
80f2f91
Update test_port_error.py
gshemesh2 Sep 17, 2025
414a2d7
Update test_port_error.py
gshemesh2 Sep 17, 2025
f8ee8d8
Update test_port_error.py
gshemesh2 Sep 17, 2025
54215ad
Update test_port_error.py
gshemesh2 Sep 17, 2025
5f36ea1
Update test_port_error.py
gshemesh2 Sep 17, 2025
389a4ab
Update test_port_error.py
gshemesh2 Sep 17, 2025
f47d7de
Merge branch 'sonic-net:master' into stress_arp_ipv6
gshemesh2 Oct 6, 2025
2c01489
Adjusting test_stress_arp is it can handle cases of ipv6-only topolog…
gshemesh2 Oct 6, 2025
545a1b3
Update conftest.py
gshemesh2 Oct 6, 2025
4937737
Update test_port_error.py
gshemesh2 Oct 6, 2025
f35bed2
Update mellanox_data.py
gshemesh2 Oct 6, 2025
3abf541
Update mellanox_data.py
gshemesh2 Oct 6, 2025
997fc4d
Update conftest.py
gshemesh2 Oct 6, 2025
94f4d3a
Update tests_mark_conditions.yaml
gshemesh2 Oct 6, 2025
4ee35ba
Update test_stress_arp.py
gshemesh2 Oct 6, 2025
412ff33
Update test_stress_arp.py
gshemesh2 Oct 6, 2025
fa19750
Update test_stress_arp.py
gshemesh2 Oct 6, 2025
6ddf91f
Update arp_utils.py
gshemesh2 Oct 6, 2025
426ce5d
Update tests_mark_conditions.yaml
gshemesh2 Oct 8, 2025
72b5e8c
Update tests_mark_conditions.yaml
gshemesh2 Oct 8, 2025
6934240
Update tests_mark_conditions.yaml
gshemesh2 Oct 8, 2025
25e9a53
Merge branch 'sonic-net:master' into stress_arp_ipv6
gshemesh2 Oct 8, 2025
7320d0b
Update tests_mark_conditions.yaml
gshemesh2 Oct 8, 2025
607954d
Merge branch 'master' into stress_arp_ipv6
gshemesh2 Oct 16, 2025
9d424b1
Update test_stress_arp.py
gshemesh2 Oct 16, 2025
b40fa15
Update test_stress_arp.py
gshemesh2 Oct 16, 2025
51078b2
Update test_stress_arp.py
gshemesh2 Oct 16, 2025
119c914
Update test_stress_arp.py
gshemesh2 Oct 16, 2025
1b325d7
Update tests_mark_conditions.yaml
gshemesh2 Oct 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/arp/arp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
BASE_MAC_PREFIX = "00:00:01"


def clear_dut_arp_cache(duthost, ns_option=None):
def clear_dut_arp_cache(duthost, ns_option=None, is_ipv6=False):
logger.info("Clearing {} neighbor table".format(duthost.hostname))
arp_flush_cmd = "ip -stats neigh flush all"
ipv6_cmd = '-6' if is_ipv6 else ''
arp_flush_cmd = "ip {} -stats neigh flush all".format(ipv6_cmd)
if ns_option:
arp_flush_cmd = "ip -stats {} neigh flush all".format(ns_option)
arp_flush_cmd = "ip {} -stats {} neigh flush all".format(ipv6_cmd, ns_option)
duthost.shell(arp_flush_cmd)


Expand Down
20 changes: 10 additions & 10 deletions tests/arp/test_stress_arp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scapy.all import Ether, IPv6, ICMPv6ND_NS, ICMPv6NDOptSrcLLAddr, in6_getnsmac, \
in6_getnsma, inet_pton, inet_ntop, socket
from ipaddress import ip_address, ip_network
from tests.common.utilities import wait_until, increment_ipv6_addr
from tests.common.utilities import wait_until, increment_ipv6_addr, is_ipv6_only_topology
from tests.common.errors import RunAnsibleModuleFail


Expand Down Expand Up @@ -37,9 +37,10 @@

@pytest.fixture(autouse=True)
def arp_cache_fdb_cleanup(duthosts, rand_one_dut_hostname, tbinfo):
is_ipv6_only = is_ipv6_only_topology(tbinfo)
duthost = duthosts[rand_one_dut_hostname]
try:
clear_dut_arp_cache(duthost)
clear_dut_arp_cache(duthost, is_ipv6=is_ipv6_only)
fdb_cleanup(duthost)
except RunAnsibleModuleFail as e:
if 'Failed to send flush request: No such file or directory' in str(e):
Expand All @@ -55,7 +56,7 @@ def arp_cache_fdb_cleanup(duthosts, rand_one_dut_hostname, tbinfo):
try:
dut_list = duthosts if "dualtor-aa" in tbinfo["topo"]["name"] else [duthost]
for dut in dut_list:
clear_dut_arp_cache(dut)
clear_dut_arp_cache(dut, is_ipv6=is_ipv6_only)
fdb_cleanup(dut)
except RunAnsibleModuleFail as e:
if 'Failed to send flush request: No such file or directory' in str(e):
Expand Down Expand Up @@ -112,7 +113,6 @@ def test_ipv4_arp(duthosts, enum_rand_one_per_hwsku_frontend_hostname,
pytest_assert(ipv4_available > 0 and fdb_available > 0, "Entries have been filled")

arp_available = min(min(ipv4_available, fdb_available), ENTRIES_NUMBERS)
# Neighbor support is dependant on NH scale for some cisco platforms.
# Limit ARP scale based on available NH entries
asic_type = duthost.facts["asic_type"]
if 'cisco-8000' in asic_type:
Expand Down Expand Up @@ -197,6 +197,7 @@ def test_ipv6_nd(duthosts, enum_rand_one_per_hwsku_frontend_hostname,
ptfhost, config_facts, tbinfo, ip_and_intf_info,
ptfadapter, get_function_completeness_level, proxy_arp_enabled):
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
is_ipv6_only = is_ipv6_only_topology(tbinfo)
_, _, ptf_intf_ipv6_addr, _, ptf_intf_index = ip_and_intf_info
ptf_intf_ipv6_addr = increment_ipv6_addr(ptf_intf_ipv6_addr)
pytest_require(proxy_arp_enabled, 'Proxy ARP not enabled for all VLANs')
Expand Down Expand Up @@ -230,7 +231,7 @@ def test_ipv6_nd(duthosts, enum_rand_one_per_hwsku_frontend_hostname,
"Neighbor Table Add failed")
finally:
try:
clear_dut_arp_cache(duthost)
clear_dut_arp_cache(duthost, is_ipv6=is_ipv6_only)
fdb_cleanup(duthost)
except RunAnsibleModuleFail as e:
if 'Failed to send flush request: No such file or directory' in str(e):
Expand Down Expand Up @@ -259,12 +260,11 @@ def send_ipv6_echo_request(ptfadapter, dut_mac, ip_and_intf_info, ptf_intf_index
testutils.send_packet(ptfadapter, ptf_intf_index, er_pkt)


def test_ipv6_nd_incomplete(duthosts, enum_rand_one_per_hwsku_frontend_hostname,
ptfhost, config_facts, tbinfo, ip_and_intf_info,
def test_ipv6_nd_incomplete(duthost, ptfhost, config_facts, tbinfo, ip_and_intf_info,
ptfadapter, get_function_completeness_level, proxy_arp_enabled):
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
_, _, ptf_intf_ipv6_addr, _, ptf_intf_index = ip_and_intf_info
ptf_intf_ipv6_addr = increment_ipv6_addr(ptf_intf_ipv6_addr)
is_ipv6_only = is_ipv6_only_topology(tbinfo)
pytest_require(proxy_arp_enabled, 'Proxy ARP not enabled for all VLANs')
pytest_require(ptf_intf_ipv6_addr is not None, 'No IPv6 VLAN address configured on device')

Expand All @@ -291,7 +291,7 @@ def test_ipv6_nd_incomplete(duthosts, enum_rand_one_per_hwsku_frontend_hostname,
logger.info("original nf_conntrack_icmpv6_timeout: {}".format(orig_conntrack_icmpv6_timeout))

try:
clear_dut_arp_cache(duthost)
clear_dut_arp_cache(duthost, is_ipv6=is_ipv6_only)

duthost.command("conntrack -F")

Expand Down Expand Up @@ -321,4 +321,4 @@ def test_ipv6_nd_incomplete(duthosts, enum_rand_one_per_hwsku_frontend_hostname,

duthost.command("conntrack -F")

clear_dut_arp_cache(duthost)
clear_dut_arp_cache(duthost, is_ipv6=is_ipv6_only)
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ arp/test_neighbor_mac_noptf.py:
conditions:
- "'standalone' in topo_name"

arp/test_stress_arp.py::test_ipv4_arp:
xfail:
reason: "skip for IPv6-only topologies"
conditions:
- "'-v6-' in topo_name"

arp/test_unknown_mac.py:
skip:
reason: "Behavior on cisco-8000 & (Marvell) platform for unknown MAC is flooding rather than DROP, hence skipping."
Expand Down
Loading