sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

Adding background traffic for pfcwd_timer_Accuracy for cisco-8000.

Open rraghav-cisco opened this issue 1 year ago • 3 comments

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.

rraghav-cisco avatar Mar 25 '24 05:03 rraghav-cisco

Oh and plus the re-org/commonization discussed in #12162

rbpittman avatar Mar 26 '24 21:03 rbpittman

Oh and plus the re-org/commonization discussed in #12162

Done.

rraghav-cisco avatar Mar 26 '24 22:03 rraghav-cisco

@kevinskwang : Randall has approved the PR. Pls review.

rraghav-cisco avatar Mar 31 '24 18:03 rraghav-cisco

Cherry-pick PR to 202305: https://github.com/sonic-net/sonic-mgmt/pull/12562

mssonicbld avatar Apr 24 '24 02:04 mssonicbld

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-mgmt/pull/12563

mssonicbld avatar Apr 24 '24 02:04 mssonicbld

@rraghav-cisco has this been verified for t2 topo ?

abdosi avatar Apr 27 '24 18:04 abdosi

@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.

rraghav-cisco avatar Apr 28 '24 20:04 rraghav-cisco