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

skipping unknown mac test for cisco 8k #7715

Conversation

AnantKishorSharma
Copy link
Contributor

@AnantKishorSharma AnantKishorSharma commented Mar 10, 2023

Description of PR

Summary:
Fixes # (issue)
Skipping unknown mac test for cisco 8k

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

To add a skip condition for unsupported feature on cisco8000 platform

How did you do it?

Added skip condition in tests/arp/test_unknown_mac.py

How did you verify/test it?

Verified internally.
-------------------------------- generated xml file: /data/tests/logs/tr_2023-03-10-07-28-26.xml ---------------------------------
----------------------------------------------------- live log sessionfinish -----------------------------------------------------
07:29:30 init.pytest_terminal_summary L0064 INFO | Can not get Allure report URL. Please check logs
=========================== short test summary info ============================
SKIPPED [3] /data/tests/common/helpers/assertions.py:13: Test is not supported for platform cisco-8000
========================== 3 skipped in 62.92 seconds ==========================
INFO:root:Can not get Allure report URL. Please check logs

Verified the changed skip reason message in UT:

arp/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-3] SKIPPED [ 33%]
arp/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-4] SKIPPED [ 66%]
arp/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-8] SKIPPED [100%]

-------------------------------- generated xml file: /data/tests/logs/tr_2023-03-28-04-23-33.xml ---------------------------------
==================================================== short test summary info =====================================================
SKIPPED [3] arp/test_unknown_mac.py:350: Not supported on cisco-8000 platform
=================================================== 3 skipped in 13.21 seconds ===================================================
INFO:root:Can not get Allure report URL. Please check logs
vxr@7443b84e2583:/data/tests$

Verified the changed skip reason:
arp/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-3] SKIPPED [ 33%]
arp/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-4] SKIPPED [ 66%]
arp/test_unknown_mac.py::TestUnknownMac::test_unknown_mac[dscp-8] SKIPPED [100%]

-------------------------------- generated xml file: /data/tests/logs/tr_2023-03-30-05-52-18.xml ---------------------------------
==================================================== short test summary info =====================================================
SKIPPED [3] arp/test_unknown_mac.py:351: Behavior on cisco-8000 platform for unknown MAC is flooding rather than DROP, hence skipping.
=================================================== 3 skipped in 9.07 seconds ====================================================
INFO:root:Can not get Allure report URL. Please check logs
vxr@sonic-ucs-m5-3:/data/tests$

Any platform specific information?

Cisco 8000

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

NA

Documentation

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 10, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: AnantKishorSharma (b0a02a7)

@mssonicbld
Copy link
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/arp/test_unknown_mac.py:62:121: E501 line too long (134 > 120 characters)

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
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/arp/test_unknown_mac.py:63:38: E127 continuation line over-indented for visual indent

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>

…ontinuation line over-indented for visual indent
neethajohn
neethajohn previously approved these changes Mar 10, 2023
@AnantKishorSharma
Copy link
Contributor Author

Hi @neethajohn , @kevinskwang, could you please merge this PR?
Failed jobs' log analysis:

  1. "CodeQL/Analyze"  Failure Reason - "(eventual cause: IOException "No space left on device")"
  2. "Test kvmtest-t0-sonic by TestbedV2" Failure Reason - "Prepare testbed timed out"
  3. "build_Azure.sonic-mgmt_merge_20230310.9" failed because of Added: ansible/roles/sonicv2 #2

@bpar9
Copy link
Contributor

bpar9 commented Mar 20, 2023

all skips are currently added via ‘tests_mark_conditions.yaml’. Adding within the script was done previously. Lately we have been adding all our skips via - https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml
So @AnantKishorSharma can you make the changes accordingly.
@neethajohn and @kevinskwang , hope this is ok

@AnantKishorSharma
Copy link
Contributor Author

@neethajohn, @kevinskwang, @bpar9 , please review the updated changes.

bpar9
bpar9 previously approved these changes Mar 28, 2023
@AnantKishorSharma
Copy link
Contributor Author

@neethajohn, @kevinskwang, @bpar9 , please review the updated changes after resolving merge conflicts with latest master.

@AnantKishorSharma
Copy link
Contributor Author

@kevinskwang, could you please help merge this?

@kevinskwang kevinskwang merged commit 0e800ed into sonic-net:master Mar 31, 2023
wangxin pushed a commit that referenced this pull request Apr 3, 2023
* skipping unknown mac test for cisco 8k

* fixing pre-commit error - tests/arp/test_unknown_mac.py:62:121: E501 line too long (134 > 120 characters)

* fixing pre-commit error - tests/arp/test_unknown_mac.py:63:38: E127 continuation line over-indented for visual indent

* moving test case skip to condition yaml

* removing test case skip from script

* Update tests_mark_conditions.yaml

* Update tests_mark_conditions.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants