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

fix QoS test skips

Open antonptashnik opened this issue 2 years ago • 2 comments

Description of PR

Summary: fix skipping of QoS tests Fixes # (issue)

  • fixes https://github.com/sonic-net/sonic-mgmt/issues/6714

  • returned original skip for test testQosSaiHeadroomPoolWatermark

During transition to conditional_mark/tests_mark_conditions.yaml, the test testQosSaiHeadroomPoolWatermark was made to xfail instead of skipping it as it was done originally. Reverted the original behavior

Type of change

  • [x] 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?

Fix test skips

How did you do it?

Corrected test skip declaration at conditional_mark/tests_mark_conditions.yaml

How did you verify/test it?

Any platform specific information?

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

Documentation

antonptashnik avatar Nov 01 '22 13:11 antonptashnik

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...............................................................Failed
- hook id: check-yaml
- exit code: 1

while constructing a mapping
in "tests/common/plugins/conditional_mark/tests_mark_conditions.yaml", line 779, column 3
found duplicate key "skip" with value "{}" (original value: "{}")
in "tests/common/plugins/conditional_mark/tests_mark_conditions.yaml", line 783, column 3

To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys

check for added large files..............................................Passed
check python ast.....................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped

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>

azure-pipelines[bot] avatar Nov 01 '22 13:11 azure-pipelines[bot]

pre-commit failed on a file check tests_mark_conditions.yaml because of a block this PR does not modify:

snmp/test_snmp_queue.py:
  skip:
    reason: "Interfaces not present on supervisor node"
    conditions:
      - "is_supervisor"
  skip:
    reason: "M0 topo does not support test_snmp_queue"
    conditions:
      - "topo_name in ['m0']"

antonptashnik avatar Nov 02 '22 07:11 antonptashnik

@yutongzhang-microsoft @wangxin @ZhaohuiS take a look please

antonptashnik avatar Dec 21 '22 15:12 antonptashnik

@XuChen-MSFT Could you please review this PR?

ZhaohuiS avatar Jan 02 '23 11:01 ZhaohuiS