Description
The function verify_tx_frame_count_dut() in tests/common/snappi_tests/traffic_generation.py is checking these 2 values:
- packets tx from TGN port(snappi_extra_params.test_tx_frames)
- Packets tx from DUT out port.(get_tx_frame_count(duthost, peer_port))
Problem is that the test_tx_frames is actually collected when the traffic is still in progress. The pause frames are still going on at this time. (from verify_basic_test_flow() function). But the DUT counters are checked after all traffic has been stopped, and whatever packets the DUT had kept in queue are all transmitted. Thus the DUT packet count is always 500+ more than the value in test_tx_frames. This causes the assert to fail:
pytest_assert(abs(sum(tgen_tx_frames) - tx_frames/sum(tgen_tx_frames) <= tx_frame_count_deviation, "Additional frames are transmitted outside of deviation. Possible PFC frames are counted.")
Steps to reproduce the issue:
Run the script: snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py
Describe the results you received:
The test fails.
Describe the results you expected:
The test should pass, but it needs to compare the counter values after the traffic has been completed.
@selldinesh , @kamalsahu0001 , @isgmano : for viz.
Description
The function verify_tx_frame_count_dut() in tests/common/snappi_tests/traffic_generation.py is checking these 2 values:
Problem is that the test_tx_frames is actually collected when the traffic is still in progress. The pause frames are still going on at this time. (from verify_basic_test_flow() function). But the DUT counters are checked after all traffic has been stopped, and whatever packets the DUT had kept in queue are all transmitted. Thus the DUT packet count is always 500+ more than the value in test_tx_frames. This causes the assert to fail:
pytest_assert(abs(sum(tgen_tx_frames) - tx_frames/sum(tgen_tx_frames) <= tx_frame_count_deviation, "Additional frames are transmitted outside of deviation. Possible PFC frames are counted.")Steps to reproduce the issue:
Run the script: snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py
Describe the results you received:
The test fails.
Describe the results you expected:
The test should pass, but it needs to compare the counter values after the traffic has been completed.
@selldinesh , @kamalsahu0001 , @isgmano : for viz.