Skip to content

Handle MegaBits speed for show int status <interface> output in test_update_speed testcase#7981

Merged
wangxin merged 2 commits intosonic-net:masterfrom
sanjair-git:update-speed
Jun 14, 2023
Merged

Handle MegaBits speed for show int status <interface> output in test_update_speed testcase#7981
wangxin merged 2 commits intosonic-net:masterfrom
sanjair-git:update-speed

Conversation

@sanjair-git
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Fixes # (issue)
This PR fixes the issue when the supported selected speed to test for the interface is in Mbps instead of Gbps.

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?

Test case 'test_update_speed' in test_eth_interface.py fails, when the supported selected speed to apply on the interface is in 'Mbps' speed instead of 'Gbps'.

How did you do it?

If the current status speed after applying the patch is in 'Mbps', handle it as it is done for 'Gbps' speed.

How did you verify/test it?

Ran the 'test_update_speed' tests against a T2 chassis.

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/generic_config_updater/test_eth_interface.py:268:121: E501 line too long (144 > 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>

@Blueve
Copy link
Copy Markdown
Collaborator

Blueve commented Apr 20, 2023

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

@sanjair-git PR conflicts with 202205 branch

mrkcmo pushed a commit to Azarack/sonic-mgmt that referenced this pull request Oct 3, 2023
…update_speed testcase (sonic-net#7981)

What is the motivation for this PR?
Test case 'test_update_speed' in test_eth_interface.py fails, when the supported selected speed to apply on the interface is in 'Mbps' speed instead of 'Gbps'.

How did you do it?
If the current status speed after applying the patch is in 'Mbps', handle it as it is done for 'Gbps' speed.

How did you verify/test it?
Ran the 'test_update_speed' tests against a T2 chassis.

Co-authored-by: rawal <amol.rawal@nokia.com>
isabelmsft pushed a commit that referenced this pull request Nov 22, 2023
…update_speed testcase (#7981)

What is the motivation for this PR?
Test case 'test_update_speed' in test_eth_interface.py fails, when the supported selected speed to apply on the interface is in 'Mbps' speed instead of 'Gbps'.

How did you do it?
If the current status speed after applying the patch is in 'Mbps', handle it as it is done for 'Gbps' speed.

How did you verify/test it?
Ran the 'test_update_speed' tests against a T2 chassis.

Co-authored-by: rawal <amol.rawal@nokia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
…update_speed testcase (sonic-net#7981)

What is the motivation for this PR?
Test case 'test_update_speed' in test_eth_interface.py fails, when the supported selected speed to apply on the interface is in 'Mbps' speed instead of 'Gbps'.

How did you do it?
If the current status speed after applying the patch is in 'Mbps', handle it as it is done for 'Gbps' speed.

How did you verify/test it?
Ran the 'test_update_speed' tests against a T2 chassis.

Co-authored-by: rawal <amol.rawal@nokia.com>
qiluo-msft pushed a commit that referenced this pull request Feb 12, 2024
## Description of PR

Summary:
Fixes # (issue)

### Type of change

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

## Approach
#### What is the motivation for this PR?
ADO 17747379 to cherry-pick sonic-utilities PR to 202205 sonic-net/sonic-utilities#3051 requires 202205 sonic-mgmt test update.

This PR cherry-picks the following PRs: #7981, #9878 (reads RDMA GCU conf file from DUT instead of copy of conf file in sonic-mgmt), #10214 (fix pfcwd test), #10241 (ensure operation is valid), #10756 (empty string edge case)
#### How did you do it?
Ensure the feature and tests are stable on 202305 and master
#### How did you verify/test it?
Monitored test results on 202305 and master for all platforms, manually ran tests on Cisco and Mellanox DUTs
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.

5 participants