Skip to content

[Snappi] Disable skip PFC watchdog tests for switches with broadcom ASICs#7718

Merged
developfast merged 7 commits intosonic-net:masterfrom
developfast:dojha/disable_skip_pfcwd_brcm
Mar 15, 2023
Merged

[Snappi] Disable skip PFC watchdog tests for switches with broadcom ASICs#7718
developfast merged 7 commits intosonic-net:masterfrom
developfast:dojha/disable_skip_pfcwd_brcm

Conversation

@developfast
Copy link
Copy Markdown
Contributor

Description of PR

Summary: With the introduction of warm-up traffic to all PFC watchdog cases (#7712 and #7499), we no longer need to worry about PFC watch dog fake alerts being read by Broadcom ASICs, as its PFC watch dog ASIC logic is no longer relevant when there is an initial flow of traffic on the test priorities. Earlier, switches with Broadcom ASICs would skip PFC watchdog tests where the PFC watch dog was not being intentionally triggered, as it could un-intentionally trigger the PFC watch dog when not needed.

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

To increase test coverage on the switches with Broadcom ASICs. Earlier these switches would not run PFC watch dog cases where PFC watch dog was not being triggered, but with code changes to add warm-up traffic, this issue is no longer present, and hence, we can re-enable back certain PFC watch dog cases.

How did you do it?

Removed the skip_pfcwd_test function and its references to have all switches run all cases of PFC watch dog test cases.

How did you verify/test it?

To be done. Waiting on an appropriate testbed.

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:3:1: F401 'tests.common.helpers.assertions.pytest_assert' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:4:1: F401 'tests.common.fixtures.conn_graph_facts.conn_graph_facts' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:4:1: F401 'tests.common.fixtures.conn_graph_facts.fanout_graph_facts' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api_serv_ip' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api_serv_port' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_testbed_config' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.prio_dscp_map' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.all_prio_list' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.lossless_prio_list' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.lossy_prio_list' imported but unused
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

neethajohn
neethajohn previously approved these changes Mar 10, 2023
baiwei0427
baiwei0427 previously approved these changes Mar 12, 2023
@developfast
Copy link
Copy Markdown
Contributor Author

DO NOT MERGE UNTIL #7712 IS MERGED.

@mssonicbld
Copy link
Copy Markdown
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:3:1: F401 'tests.common.helpers.assertions.pytest_assert' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:4:1: F401 'tests.common.fixtures.conn_graph_facts.conn_graph_facts' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:4:1: F401 'tests.common.fixtures.conn_graph_facts.fanout_graph_facts' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api_serv_ip' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api_serv_port' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_testbed_config' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.prio_dscp_map' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.all_prio_list' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.lossless_prio_list' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.lossy_prio_list' imported but unused
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@mssonicbld
Copy link
Copy Markdown
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:3:1: F401 'tests.common.helpers.assertions.pytest_assert' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:4:1: F401 'tests.common.fixtures.conn_graph_facts.conn_graph_facts' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:4:1: F401 'tests.common.fixtures.conn_graph_facts.fanout_graph_facts' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api_serv_ip' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api_serv_port' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_api' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:6:1: F401 'tests.common.snappi.snappi_fixtures.snappi_testbed_config' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.prio_dscp_map' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.all_prio_list' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.lossless_prio_list' imported but unused
tests/snappi/pfcwd/test_pfcwd_a2a_with_snappi.py:8:1: F401 'tests.common.snappi.qos_fixtures.lossy_prio_list' imported but unused
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@developfast developfast merged commit cbe7050 into sonic-net:master Mar 15, 2023
wangxin pushed a commit that referenced this pull request Mar 16, 2023
…SICs (#7718)

remove skip_pfcwd_test for broadcom devices since all pfcwd tests have warm up traffic now
wangxin pushed a commit that referenced this pull request Mar 16, 2023
…SICs (#7718)

remove skip_pfcwd_test for broadcom devices since all pfcwd tests have warm up traffic now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants