sonic-mgmt
sonic-mgmt copied to clipboard
Adding background traffic for pfcwd_timer_Accuracy for cisco-8000.
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 testbed with a sonic fanout:
=============================================================================================== PASSES =============================================================================================== _______________________________________________________________________ TestPfcwdAllTimer.test_pfcwd_timer_accuracy[mth-t0-64] _______________________________________________________________________ --------------------------------------------- generated xml file: /run_logs/2024-03-25-04-22-06/pfcwd/test_pfcwd_timer_accuracy_2024-03-25-04-22-06.xml ---------------------------------------------- INFO:root:Can not get Allure report URL. Please check logs --------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------- 04:39:24 __init__.pytest_terminal_summary L0064 INFO | Can not get Allure report URL. Please check logs ====================================================================================== short test summary info ======================================================================================= PASSED pfcwd/test_pfcwd_timer_accuracy.py::TestPfcwdAllTimer::test_pfcwd_timer_accuracy[mth-t0-64] ============================================================================= 1 passed, 1 warning in 1036.69s (0:17:16) ============================================================================== sonic@3852cf4ada95:/data/tests$
Any platform specific information?
Specific to cisco-8000 only.
Oh and plus the re-org/commonization discussed in #12162
Oh and plus the re-org/commonization discussed in #12162
Done.
@kevinskwang : Randall has approved the PR. Pls review.
Cherry-pick PR to 202305: https://github.com/sonic-net/sonic-mgmt/pull/12562
Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-mgmt/pull/12563
@rraghav-cisco has this been verified for t2 topo ?
@abdosi , I have verified the new function works in the T2 topology - it just needs PTF, nothing else. But my run failed due to other TB related issues.