Skip to content

MIGSMSFT-647 improve qos/test_qos_sai.py to have different longlink/shortlink combinations#14746

Merged
yejianquan merged 1 commit intosonic-net:masterfrom
zhixzhu:qos_sai_lc_combination
Oct 2, 2024
Merged

MIGSMSFT-647 improve qos/test_qos_sai.py to have different longlink/shortlink combinations#14746
yejianquan merged 1 commit intosonic-net:masterfrom
zhixzhu:qos_sai_lc_combination

Conversation

@zhixzhu
Copy link
Contributor

@zhixzhu zhixzhu commented Sep 25, 2024

Description of PR

Summary:
Fixes MIGSMSFT-647

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

Have different combinations of longlink and shortlink in test_qos_sai.py.

How did you do it?

Extend params in select_src_dst_dut_and_asic.

How did you verify/test it?

Verified on T2 testbed which has 3 linecards, 1st linecard longlink, 2nd linecard shortlink, 3rd linecard shortlink.

---------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-25-20-41-38.xml -----------------------------------------------
----------------------------------------------------------------------------------- live log sessionfinish -----------------------------------------------------------------------------------
21:08:01 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
================================================================================== short test summary info ===================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_dut_multi_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_longlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_longlink]
========================================================================= 5 passed, 1 warning in 1581.20s (0:26:21) ==========================================================================
INFO:root:Can not get Allure report URL. Please check logs
sonic@sonic-ucs-m6-4:/data/tests$ 

[multi_dut_longlink_to_shortlink]: src_dut_index=0;src_asic_index=0;dst_dut_index=1;dst_asic_index=0
[multi_dut_shortlink_to_shortlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=2;dst_asic_index=0
[multi_dut_shortlink_to_longlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=0;dst_asic_index=0

Verified on T1, no impact on T1.

------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-27-18-34-12.xml -------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
18:38:06 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
SKIPPED [1] qos/test_qos_sai.py:315: Did not find any frontend node that is multi-asic - so can't run single_dut_multi_asic tests
SKIPPED [3] qos/test_qos_sai.py:315: multi-dut is not supported on T1 topologies
======================================================================= 1 passed, 4 skipped, 1 warning in 232.24s (0:03:52) =======================================================================
sonic@sonic-ucs-m5-8:/data/tests$ 

Any platform specific information?

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

Documentation

@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.................................................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/qos/qos_sai_base.py:594:121: E501 line too long (174 > 120 characters)
tests/qos/qos_sai_base.py:657:121: E501 line too long (133 > 120 characters)
tests/qos/qos_sai_base.py:662:121: E501 line too long (143 > 120 characters)

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(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>

@zhixzhu zhixzhu force-pushed the qos_sai_lc_combination branch from 591931d to 2a133d5 Compare September 25, 2024 21:36
@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.................................................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/qos/qos_sai_base.py:660:121: E501 line too long (133 > 120 characters)
tests/qos/qos_sai_base.py:665:121: E501 line too long (143 > 120 characters)

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(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>

@zhixzhu zhixzhu force-pushed the qos_sai_lc_combination branch from 2a133d5 to 1d73f8f Compare September 25, 2024 23:09
@zhixzhu zhixzhu marked this pull request as ready for review September 25, 2024 23:10
@sdszhang
Copy link
Contributor

@abdosi @sdszhang pls review.

Copy link
Contributor

@sdszhang sdszhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@abdosi abdosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abdosi
Copy link
Contributor

abdosi commented Sep 30, 2024

@vmittal-msft @mlok-nokia for viz.

@yejianquan yejianquan merged commit 3312543 into sonic-net:master Oct 2, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Oct 2, 2024
Description of PR
Summary:
Fixes MIGSMSFT-647

Approach
What is the motivation for this PR?
Have different combinations of longlink and shortlink in test_qos_sai.py.

How did you do it?
Extend params in select_src_dst_dut_and_asic.

How did you verify/test it?
Verified on T2 testbed which has 3 linecards, 1st linecard longlink, 2nd linecard shortlink, 3rd linecard shortlink.

---------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-25-20-41-38.xml -----------------------------------------------
----------------------------------------------------------------------------------- live log sessionfinish -----------------------------------------------------------------------------------
21:08:01 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
================================================================================== short test summary info ===================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_dut_multi_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_longlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_longlink]
========================================================================= 5 passed, 1 warning in 1581.20s (0:26:21) ==========================================================================
INFO:root:Can not get Allure report URL. Please check logs
sonic@sonic-ucs-m6-4:/data/tests$ 

[multi_dut_longlink_to_shortlink]: src_dut_index=0;src_asic_index=0;dst_dut_index=1;dst_asic_index=0
[multi_dut_shortlink_to_shortlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=2;dst_asic_index=0
[multi_dut_shortlink_to_longlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=0;dst_asic_index=0
Verified on T1, no impact on T1.

------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-27-18-34-12.xml -------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
18:38:06 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
SKIPPED [1] qos/test_qos_sai.py:315: Did not find any frontend node that is multi-asic - so can't run single_dut_multi_asic tests
SKIPPED [3] qos/test_qos_sai.py:315: multi-dut is not supported on T1 topologies
======================================================================= 1 passed, 4 skipped, 1 warning in 232.24s (0:03:52) =======================================================================
sonic@sonic-ucs-m5-8:/data/tests$ 

Signed-off-by: Zhixin Zhu <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #14821

mssonicbld pushed a commit that referenced this pull request Oct 2, 2024
Description of PR
Summary:
Fixes MIGSMSFT-647

Approach
What is the motivation for this PR?
Have different combinations of longlink and shortlink in test_qos_sai.py.

How did you do it?
Extend params in select_src_dst_dut_and_asic.

How did you verify/test it?
Verified on T2 testbed which has 3 linecards, 1st linecard longlink, 2nd linecard shortlink, 3rd linecard shortlink.

---------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-25-20-41-38.xml -----------------------------------------------
----------------------------------------------------------------------------------- live log sessionfinish -----------------------------------------------------------------------------------
21:08:01 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
================================================================================== short test summary info ===================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_dut_multi_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_longlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_longlink]
========================================================================= 5 passed, 1 warning in 1581.20s (0:26:21) ==========================================================================
INFO:root:Can not get Allure report URL. Please check logs
sonic@sonic-ucs-m6-4:/data/tests$ 

[multi_dut_longlink_to_shortlink]: src_dut_index=0;src_asic_index=0;dst_dut_index=1;dst_asic_index=0
[multi_dut_shortlink_to_shortlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=2;dst_asic_index=0
[multi_dut_shortlink_to_longlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=0;dst_asic_index=0
Verified on T1, no impact on T1.

------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-27-18-34-12.xml -------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
18:38:06 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
SKIPPED [1] qos/test_qos_sai.py:315: Did not find any frontend node that is multi-asic - so can't run single_dut_multi_asic tests
SKIPPED [3] qos/test_qos_sai.py:315: multi-dut is not supported on T1 topologies
======================================================================= 1 passed, 4 skipped, 1 warning in 232.24s (0:03:52) =======================================================================
sonic@sonic-ucs-m5-8:/data/tests$ 

Signed-off-by: Zhixin Zhu <[email protected]>
@zhixzhu zhixzhu deleted the qos_sai_lc_combination branch October 2, 2024 16:24
hdwhdw pushed a commit to hdwhdw/sonic-mgmt that referenced this pull request Oct 10, 2024
Description of PR
Summary:
Fixes MIGSMSFT-647

Approach
What is the motivation for this PR?
Have different combinations of longlink and shortlink in test_qos_sai.py.

How did you do it?
Extend params in select_src_dst_dut_and_asic.

How did you verify/test it?
Verified on T2 testbed which has 3 linecards, 1st linecard longlink, 2nd linecard shortlink, 3rd linecard shortlink.

---------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-25-20-41-38.xml -----------------------------------------------
----------------------------------------------------------------------------------- live log sessionfinish -----------------------------------------------------------------------------------
21:08:01 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
================================================================================== short test summary info ===================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_dut_multi_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_longlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_longlink]
========================================================================= 5 passed, 1 warning in 1581.20s (0:26:21) ==========================================================================
INFO:root:Can not get Allure report URL. Please check logs
sonic@sonic-ucs-m6-4:/data/tests$ 

[multi_dut_longlink_to_shortlink]: src_dut_index=0;src_asic_index=0;dst_dut_index=1;dst_asic_index=0
[multi_dut_shortlink_to_shortlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=2;dst_asic_index=0
[multi_dut_shortlink_to_longlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=0;dst_asic_index=0
Verified on T1, no impact on T1.

------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-27-18-34-12.xml -------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
18:38:06 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
SKIPPED [1] qos/test_qos_sai.py:315: Did not find any frontend node that is multi-asic - so can't run single_dut_multi_asic tests
SKIPPED [3] qos/test_qos_sai.py:315: multi-dut is not supported on T1 topologies
======================================================================= 1 passed, 4 skipped, 1 warning in 232.24s (0:03:52) =======================================================================
sonic@sonic-ucs-m5-8:/data/tests$ 

Signed-off-by: Zhixin Zhu <[email protected]>
vikshaw-Nokia pushed a commit to vikshaw-Nokia/sonic-mgmt that referenced this pull request Oct 23, 2024
Description of PR
Summary:
Fixes MIGSMSFT-647

Approach
What is the motivation for this PR?
Have different combinations of longlink and shortlink in test_qos_sai.py.

How did you do it?
Extend params in select_src_dst_dut_and_asic.

How did you verify/test it?
Verified on T2 testbed which has 3 linecards, 1st linecard longlink, 2nd linecard shortlink, 3rd linecard shortlink.

---------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-25-20-41-38.xml -----------------------------------------------
----------------------------------------------------------------------------------- live log sessionfinish -----------------------------------------------------------------------------------
21:08:01 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
================================================================================== short test summary info ===================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_dut_multi_asic]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_longlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_shortlink]
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[multi_dut_shortlink_to_longlink]
========================================================================= 5 passed, 1 warning in 1581.20s (0:26:21) ==========================================================================
INFO:root:Can not get Allure report URL. Please check logs
sonic@sonic-ucs-m6-4:/data/tests$ 

[multi_dut_longlink_to_shortlink]: src_dut_index=0;src_asic_index=0;dst_dut_index=1;dst_asic_index=0
[multi_dut_shortlink_to_shortlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=2;dst_asic_index=0
[multi_dut_shortlink_to_longlink]: src_dut_index=1;src_asic_index=0;dst_dut_index=0;dst_asic_index=0
Verified on T1, no impact on T1.

------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testParameter_2024-09-27-18-34-12.xml -------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
18:38:06 __init__.pytest_terminal_summary         L0067 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testParameter[single_asic]
SKIPPED [1] qos/test_qos_sai.py:315: Did not find any frontend node that is multi-asic - so can't run single_dut_multi_asic tests
SKIPPED [3] qos/test_qos_sai.py:315: multi-dut is not supported on T1 topologies
======================================================================= 1 passed, 4 skipped, 1 warning in 232.24s (0:03:52) =======================================================================
sonic@sonic-ucs-m5-8:/data/tests$ 

Signed-off-by: Zhixin Zhu <[email protected]>
@rlhui rlhui added the Test gap label Dec 11, 2024
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