sonic-mgmt
sonic-mgmt copied to clipboard
Adding background traffic to all-port-storm.
Description of PR
Summary:
Recently cisco-8000 pfcwd was changed to not trigger watchdog when there is no traffic. So the pfcwd_timer_accuracy script fails, since there is no watchdog triggered during the test. So in this PR a new fixture is added for cisco-8000 only, that will run a background traffic on the selected port when the timer accuracy test is run.
Type of change
- [X] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] Test case(new/improvement)
Back port request
- [ ] 201911
- [ ] 202012
- [ ] 202205
- [X] 202305
- [X] 202311
Approach
What is the motivation for this PR?
The pfcwd feature was updated not to trigger watchdog when no traffic is present. So we need a background traffic to make the timer accuracy script to work.
How did you do it?
Added a background traffic fixture function, that uses supervisor in the PTF container.
How did you verify/test it?
Ran on T0 TB with sonic fanout:
=============================================================================================== PASSES =============================================================================================== ____________________________________________________________________ TestPfcwdAllPortStorm.test_all_port_storm_restore[mth-t0-64] ____________________________________________________________________ --------------------------------------------- generated xml file: /run_logs/2024-03-25-20-11-56/pfcwd/test_pfcwd_all_port_storm_2024-03-25-20-11-56.xml ---------------------------------------------- INFO:root:Can not get Allure report URL. Please check logs --------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------- 20:17:04 __init__.pytest_terminal_summary L0064 INFO | Can not get Allure report URL. Please check logs ====================================================================================== short test summary info ======================================================================================= PASSED pfcwd/test_pfcwd_all_port_storm.py::TestPfcwdAllPortStorm::test_all_port_storm_restore[mth-t0-64] ============================================================================== 1 passed, 1 warning in 306.27s (0:05:06) ============================================================================== sonic@3852cf4ada95:/data/tests$
Any platform specific information?
Specific to cisco-8000 only.
The azure pipeline failure here is due to the dependency on the new function introduced in https://github.com/sonic-net/sonic-mgmt/pull/12143 After merging https://github.com/sonic-net/sonic-mgmt/pull/12143, this test should pass.
@kevinskwang : Randall has approved the PR. Pls review.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-mgmt/pull/12568
Cherry-pick PR to 202305: https://github.com/sonic-net/sonic-mgmt/pull/12569