From f8c59caf27bb477c62d36fbccede7fbf138f0ff9 Mon Sep 17 00:00:00 2001 From: Prabhat Aravind Date: Wed, 2 Aug 2023 18:31:39 +0000 Subject: [PATCH] [tests/bgp]: Miscellaneous fixes * Check all queues for the test instead of just q0 * Remove check for q7 counters until regression due to https://github.com/sonic-net/sonic-swss/pull/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 --- tests/bgp/test_bgp_queue.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/bgp/test_bgp_queue.py b/tests/bgp/test_bgp_queue.py index bf670fde7d7..6192cb46076 100644 --- a/tests/bgp/test_bgp_queue.py +++ b/tests/bgp/test_bgp_queue.py @@ -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']: @@ -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)