Skip to content

Commit

Permalink
[tests/bgp]: Miscellaneous fixes
Browse files Browse the repository at this point in the history
 * Check all queues for the test instead of just q0
 * Remove check for q7 counters until regression due to
   sonic-net/sonic-swss#2143 is fixed
 * Perform interface queue counter checks only once when there are v4 and v6
   neighbors over the same interface

Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
  • Loading branch information
prabhataravind committed Aug 2, 2023
1 parent 717d1e4 commit f8c59ca
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/bgp/test_bgp_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_bgp_queues(duthosts, enum_frontend_dut_hostname, enum_asic_index, tbinf

arp_dict = {}
ndp_dict = {}
processed_intfs = set()
show_arp = duthost.command('show arp')
show_ndp = duthost.command('show ndp')
for arp_entry in show_arp['stdout_lines']:
Expand All @@ -62,12 +63,15 @@ def test_bgp_queues(duthosts, enum_frontend_dut_hostname, enum_asic_index, tbinf
ifname = arp_dict[k].split('.', 1)[0]
else:
ifname = ndp_dict[k].split('.', 1)[0]
if ifname in processed_intfs:
continue
if (ifname.startswith("PortChannel")):
for port in mg_facts['minigraph_portchannels'][ifname]['members']:
logger.info("PortChannel '{}' : port {}".format(ifname, port))
assert(get_queue_counters(duthost, port, "0") == 0)
assert(get_queue_counters(duthost, port, "7"))
for q in range(0, 7):
assert(get_queue_counters(duthost, port, q) == 0)
else:
logger.info(ifname)
assert(get_queue_counters(duthost, ifname, "0") == 0)
assert(get_queue_counters(duthost, ifname, "7"))
for q in range(0, 7):
assert(get_queue_counters(duthost, ifname, q) == 0)
processed_intfs.add(ifname)

0 comments on commit f8c59ca

Please sign in to comment.