Skip to content

Commit

Permalink
Examine the tx counters in WRRtest instead of counting what arrives a…
Browse files Browse the repository at this point in the history
…t PTF

This test causes a burst of traffic to be transmitted by the DUT, but the
intervening network between the DUT and PTF may not be capable of handling the
entire burst of packets at full linerate.  Instead inspect the packet transmit
counters on the appropriate interface to ensure that at least the correct number
of packets were transmitted, and ensure that at least 1 of the packets are
observed at PTF.
  • Loading branch information
AKosturArista authored and byu343 committed Nov 5, 2024
1 parent 9c12485 commit d40f908
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/saitests/py3/sai_qos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3878,8 +3878,12 @@ def runTest(self):
queue_counters_base)), file=sys.stderr)

print([q_cnt_sum, total_pkts], file=sys.stderr)
# All packets sent should be received intact
assert (q_cnt_sum == total_pkts)

txPacketCount = port_counters[TRANSMITTED_OCTETS] - port_counters_base[TRANSMITTED_OCTETS]
# At least the correct number of packets must have been transmitted
assert (q_cnt_sum <= txPacketCount)
# And at least one of the valid packets has arrived at PTF
assert (total_pkts > 1)


class LossyQueueTest(sai_base_test.ThriftInterfaceDataPlane):
Expand Down

0 comments on commit d40f908

Please sign in to comment.