Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202405] Fix test_pfcwd_function on Mellanox platform #16117

Merged

Conversation

bingwang-ms
Copy link
Collaborator

Description of PR

Summary:
This PR is to fix test issue caused by PR #15946

The code below is to ensure there is PFCWD triggered on new queues before checking syslog.

pytest_assert(wait_until(PFC_STORM_TIMEOUT, 2, 0,
lambda: check_pfc_storm_state(dut, port, self.storm_hndle.pfc_queue_idx) != pfcwd_stats_before_test), # noqa: E501, E128
"PFC storm state did not change as expected") # noqa: E127

The test is flaky after change in #15946 because the wait time is not enough for PFCWD to be triggered on new queues.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

This PR is to fix test issue caused by PR #15946

How did you do it?

Change the logic back while maintain compatibility with chassis.

How did you verify/test it?

The change is verified on a Mellanox platform.

collected 5 items                                                                                                                                                                                     

pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_actions[str2-msn4600c-acs-04]  ^H ^H ^H ^HPASSED                                                                                                    [ 20%]
pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_multi_port[str2-msn4600c-acs-04]  ^H ^H ^HPASSED                                                                                                 [ 40%]
pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_mmu_change[str2-msn4600c-acs-04]  ^H ^HPASSED                                                                                                 [ 60%]
pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_port_toggle[str2-msn4600c-acs-04]  ^H ^H ^HPASSED                                                                                                [ 80%]
pfcwd/test_pfcwd_function.py::TestPfcwdFunc::test_pfcwd_no_traffic[str2-msn4600c-acs-04] SKIPPED (This test is applicable only for cisco-8000 / Pfcwd tests skipped on m0/mx testbed.)          [100%]

Any platform specific information?

Mellanox platform specific.

Supported testbed topology if it's a new test case?

Not a new test.

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@auspham auspham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for taking care of this

@yejianquan yejianquan merged commit 77c2f89 into sonic-net:202405 Dec 18, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants