Skip to content

Enhance qos tests to support single-asic, multi-asic, and multi-dut testing#8149

Merged
XuChen-MSFT merged 15 commits intosonic-net:masterfrom
vmittal-msft:vmittal/multi-asic
Jul 26, 2023
Merged

Enhance qos tests to support single-asic, multi-asic, and multi-dut testing#8149
XuChen-MSFT merged 15 commits intosonic-net:masterfrom
vmittal-msft:vmittal/multi-asic

Conversation

@vmittal-msft
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)
The existing QoS (test_qos_sai.py) is written to accomodata a single asic on a single Dut. But, we require the same tests to be executed against a T2 chassis (with single/multi-asic linecards) and multi-asic pizza boxes.

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?

All the test cases create a list of src and dst ports. For the different modes, here is the distribution of the src and dst ports:

  • single_asic: The src and dst ports are on the same asic on the same linecard.
  • single_dut_multi_asic: On a multi-asic DUT/linecard, the src port is on an asic, while the dst ports are on another asic on the same DUT/linecard
  • multi_dut: The src port is on an asic on one of the DUT/linecards, and the dst port is on another asic on another DUT/linecard. This is currently only required for T2 topology

How did you do it?

Approach to accomplish this is the following:

  • All the tests have to parameterized for the 3 modes defined above.

    • This is done using the 'select_src_and_dst_dut_and_asic' fixture that is parameterized for 'single_asic', 'single_dut_multi_asic', 'multi_dut' - Based on the mode, it sets the src_dut_index, dst_dut_index, src_asic_index and dst_asic_index
    • Added fixture 'get_src_dst_asic_and_duts' that returns dictionary of the src_dut_index, dst_dut_index, src_asic_index, and dst_asic_index, and the src_dut and dst_dut (instances of MultiAsicSonicHost), src_asic and dst_asic (instances of Asic), and also a list of all DUTs and all Asics
  • dutConfig is modified such that testPortIds and testPortIps are collecting from all the duts and asics involved and stored in a dictionary with key being the dutIndex and value being a dictionary per asic index.

    • __buildTestPorts then sets the src and dst ports based on the src_dut_index, dst_dut_index, src_asic_index and dst_asic_index
  • All the other fixtures and tests, we use 'get_src_dst_asci_and_duts' fixture instead of enum_rand_one_frontend_hostname and enum_frontend_index.

    • The code instead the fixtures and tests is modified to the actions on the correct src/dst dut or asic. For example: - swap_syncd fixture would swap syncd docker on all DUT's (both src and dst) instead of just one DUT as before. - stopServices - do it all_duts (src and dst duts)
  • Similarly, changes to saitests involved dealing with multiple DUTs (and thus multiple sai clients) and modifying other data structure like 'interface_to_front_mapping' in sai_base_test.py and port_list, sai_port_list, front_port_list in switch.py to deal with multiple duts (modified to be dictionary with keys being 'src' and 'dst')

    • default_interface_to_front_map.ini file in ptf modified to have syntax: ptf_port@dut_port:dut_index - Done by using new fixture 'ptf_portmap_file_all_frontend_nodes' in ptfhost_utils.py
    • tests in sai_qos_tests.py pass src_dut_index and dst_dut_index in the testParams.
      • The saitests classes then use this to do the actions on the right client and ports.
  • Assumptions:

    • For multi-dut, we are assuming that hwsku for all the cards are same.

How did you verify/test it?

Ran the tests against T2 J2C+ chassis.

Any platform specific information?

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

Documentation

@vmittal-msft
Copy link
Contributor Author

Porting changes from following PR to master branch -
#6946

Same changes has been pushed to 202205 branch recently using -
#8059

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Failed
- hook id: check-ast
- exit code: 1

tests/qos/qos_sai_base.py: failed parsing with CPython 3.8.10:

Traceback (most recent call last):
File "/home/AzDevOps/.cache/pre-commit/repo2aflhnh5/py_env-python3/lib/python3.8/site-packages/pre_commit_hooks/check_ast.py", line 21, in main
ast.parse(f.read(), filename=filename)
...
[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
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Failed
- hook id: check-ast
- exit code: 1

tests/qos/qos_sai_base.py: failed parsing with CPython 3.8.10:

Traceback (most recent call last):
File "/home/AzDevOps/.cache/pre-commit/repo2tih44i2/py_env-python3/lib/python3.8/site-packages/pre_commit_hooks/check_ast.py", line 21, in main
ast.parse(f.read(), filename=filename)
...
[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>

@vmittal-msft
Copy link
Contributor Author

202205 PR - #8213

@vmittal-msft vmittal-msft requested a review from StormLiangMS May 4, 2023 21:51
@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Failed
- hook id: check-ast
- exit code: 1

tests/qos/qos_sai_base.py: failed parsing with CPython 3.8.10:

Traceback (most recent call last):
File "/home/AzDevOps/.cache/pre-commit/repo2u3z7fgl/py_env-python3/lib/python3.8/site-packages/pre_commit_hooks/check_ast.py", line 21, in main
ast.parse(f.read(), filename=filename)
...
[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
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

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/common/devices/sonic_asic.py:379:78: E202 whitespace before ')'
tests/common/devices/sonic_asic.py:382:5: E303 too many blank lines (2)
tests/common/fixtures/ptfhost_utils.py:561:93: E211 whitespace before '['
tests/common/fixtures/ptfhost_utils.py:562:25: E122 continuation line missing indentation or outdented
...
[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
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

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/common/fixtures/ptfhost_utils.py:561:93: E211 whitespace before '['
tests/conftest.py:1731:25: E203 whitespace before ':'
tests/conftest.py:1732:25: E203 whitespace before ':'
tests/conftest.py:1733:28: E203 whitespace before ':'
...
[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
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

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/common/fixtures/ptfhost_utils.py:561:93: E211 whitespace before '['
tests/qos/qos_sai_base.py:90:27: F821 undefined name 'dut_test_params'
tests/qos/qos_sai_base.py:458:103: F811 redefinition of unused 'lower_tor_host' from line 17
tests/qos/qos_sai_base.py:481:21: F821 undefined name 'docker'
...
[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
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

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/common/fixtures/ptfhost_utils.py:561:93: E211 whitespace before '['
tests/qos/qos_sai_base.py:90:27: F821 undefined name 'dut_test_params'
tests/qos/qos_sai_base.py:458:103: F811 redefinition of unused 'lower_tor_host' from line 17
tests/qos/qos_sai_base.py:481:21: F821 undefined name 'docker'
...
[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>

@xwjiang-ms
Copy link
Contributor

The pre-commit check is a mandatory check, please fix detected issues

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

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/common/fixtures/ptfhost_utils.py:561:93: E211 whitespace before '['
tests/qos/qos_sai_base.py:90:27: F821 undefined name 'dut_test_params'
tests/qos/qos_sai_base.py:458:103: F811 redefinition of unused 'lower_tor_host' from line 17
tests/qos/qos_sai_base.py:481:21: F821 undefined name 'docker'
...
[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
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py
Fixing tests/qos/qos_sai_base.py

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/qos/qos_sai_base.py:89:27: F821 undefined name 'dut_test_params'
tests/qos/qos_sai_base.py:457:103: F811 redefinition of unused 'lower_tor_host' from line 17
tests/qos/qos_sai_base.py:480:21: F821 undefined name 'docker'
tests/qos/qos_sai_base.py:485:21: F821 undefined name 'docker'
...
[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>

@wsycqyz
Copy link
Contributor

wsycqyz commented Jun 9, 2023

The pre-commit check is a mandatory check, please fix.

@XuChen-MSFT
Copy link
Contributor

@vmittal-msft did you run qos test on single box device? and can you resolve conflict?

mssonicbld pushed a commit that referenced this pull request Feb 1, 2024
* Fix dscp remapping cases

1. fix the lag support logic for dscp remapping test
2. fix a bug introduced by community PR #8149
rlhui pushed a commit that referenced this pull request Jan 8, 2025
In #8149 the multi-asic and multi-dut variants were added to test_qos_sai.py.
This required updating calls to dynamically_compensate_leakout to specify either the src_client or dst_clientbut a couple calls inPGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see #16167

Summary:
Fixes #16167
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Jan 9, 2025
…net#16169)

In sonic-net#8149 the multi-asic and multi-dut variants were added to test_qos_sai.py.
This required updating calls to dynamically_compensate_leakout to specify either the src_client or dst_clientbut a couple calls inPGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see sonic-net#16167

Summary:
Fixes sonic-net#16167
yejianquan pushed a commit to yejianquan/sonic-mgmt that referenced this pull request Jan 17, 2025
…net#16169)

In sonic-net#8149 the multi-asic and multi-dut variants were added to test_qos_sai.py.
This required updating calls to dynamically_compensate_leakout to specify either the src_client or dst_clientbut a couple calls inPGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see sonic-net#16167

Summary:
Fixes sonic-net#16167
yejianquan added a commit to yejianquan/sonic-mgmt that referenced this pull request Jan 17, 2025
In sonic-net#8149 the multi-asic and multi-dut variants were added to test_qos_sai.py. This required updating calls to dynamically_compensate_leakout to specify either the src_client or dst_clientbut a couple calls inPGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see sonic-net#16167

Summary: Fixes sonic-net#16167

Correcting client arguments to dynamically_compensate_leakout (sonic-net#16169)

co-authorized by: jianquanye@microsoft.com
wangxin pushed a commit to wangxin/sonic-mgmt that referenced this pull request Feb 21, 2025
…net#16169)

In sonic-net#8149 the multi-asic and multi-dut variants were added to test_qos_sai.py.
This required updating calls to dynamically_compensate_leakout to specify either the src_client or dst_clientbut a couple calls inPGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see sonic-net#16167

Summary:
Fixes sonic-net#16167
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
…net#16169)

In sonic-net#8149 the multi-asic and multi-dut variants were added to test_qos_sai.py.
This required updating calls to dynamically_compensate_leakout to specify either the src_client or dst_clientbut a couple calls inPGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see sonic-net#16167

Summary:
Fixes sonic-net#16167
mssonicbld added a commit to mssonicbld/sonic-mgmt.msft that referenced this pull request Jun 16, 2025
…GSharedWatermarkTest`

In sonic-net/sonic-mgmt#8149 the `multi-asic` and `multi-dut` variants were added to `test_qos_sai.py`.
This required updating calls to `dynamically_compensate_leakout` to specify either the `src_client` or dst_client` but a couple calls in `PGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see sonic-net/sonic-mgmt#16167

Summary:
Fixes #16167

### Type of change

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

### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [x] 202405
mssonicbld added a commit to Azure/sonic-mgmt.msft that referenced this pull request Jun 16, 2025
…nsate_leakout` in `PGSharedWatermarkTest` (#407)

In sonic-net/sonic-mgmt#8149 the `multi-asic` and `multi-dut` variants were added to `test_qos_sai.py`.
This required updating calls to `dynamically_compensate_leakout` to specify either the `src_client` or dst_client` but a couple calls in `PGSharedWatermarkTest` passed the wrong client.

For more details on the failure this causes see sonic-net/sonic-mgmt#16167

Summary:
Fixes #16167

### Type of change

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

### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [x] 202405
yejianquan pushed a commit that referenced this pull request Sep 11, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: #8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
mssonicbld added a commit to mssonicbld/sonic-mgmt.msft that referenced this pull request Sep 11, 2025
<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit easier:
-->
### Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net/sonic-mgmt#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.
Summary:
Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505

### Approach
#### What is the motivation for this PR?

#### How did you do it?

#### How did you verify/test it?

#### Any platform specific information?

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

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
yejianquan added a commit to Azure/sonic-mgmt.msft that referenced this pull request Sep 11, 2025
…ith soft_reset (#697)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
### Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is
changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR:
sonic-net/sonic-mgmt#8149

After debugging and discussion, it is confirmed that the script was
added to fix a TD2-specific issue and is not applicable to Cisco
devices.

Following the discussions, we implemented a fix to skip the MAC address
setting for Cisco platforms.
Summary:
Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505

### Approach
#### What is the motivation for this PR?

#### How did you do it?

#### How did you verify/test it?

#### Any platform specific information?

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

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
xixuej pushed a commit to xixuej/sonic-mgmt that referenced this pull request Sep 17, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
dayouliu1 pushed a commit to dayouliu1/sonic-mgmt that referenced this pull request Sep 18, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
vidyac86 pushed a commit to vidyac86/sonic-mgmt that referenced this pull request Oct 23, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com

Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Jan 28, 2026
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
Description of PR
Recently, a new QoS test case was added, which triggered an issue:
https://migsonic.atlassian.net/browse/MIGSMSFT-1203

The root cause is that during the test case, the system MAC address is changed after a soft reset. The script that

changes the MAC address was introduced in the following upstream PR: sonic-net#8149

After debugging and discussion, it is confirmed that the script was added to fix a TD2-specific issue and is not applicable to Cisco devices.

Following the discussions, we implemented a fix to skip the MAC address setting for Cisco platforms.

signed-off-by: jianquanye@microsoft.com
Signed-off-by: Yael Tzur <ytzur@nvidia.com>
XuChen-MSFT added a commit to XuChen-MSFT/sonic-mgmt that referenced this pull request Mar 17, 2026
set() does not support index assignment (portIds[idx] = ...) which
replaceNonExistentPortId() uses internally. This is a pre-existing bug
from PR sonic-net#8149 (test_qos_sai.py L345), moved here during refactoring.
The set() was likely intended for deduplication but breaks item
assignment. In practice it rarely triggered because most testbeds
have all valid ports, so the index assignment path was never reached.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xu Chen <xuchen3@microsoft.com>
XuChen-MSFT added a commit to XuChen-MSFT/sonic-mgmt that referenced this pull request Mar 23, 2026
set() does not support index assignment (portIds[idx] = ...) which
replaceNonExistentPortId() uses internally. This is a pre-existing bug
from PR sonic-net#8149 (test_qos_sai.py L345), moved here during refactoring.
The set() was likely intended for deduplication but breaks item
assignment. In practice it rarely triggered because most testbeds
have all valid ports, so the index assignment path was never reached.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Xu Chen <xuchen3@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants