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

[T2] Add case to test lossy fair-voq #10838

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

zhixzhu
Copy link
Contributor

@zhixzhu zhixzhu commented Nov 23, 2023

Description of PR

1, Add a new case to test lossy fair-voq.
2, Add lossy_queue_voq_2 and lossy_queue_voq_3 to qos_param_generator.py.
Default-voq and fair-voq will pass lossy_queue_voq_2, fair-voq and split-voq will pass lossy_queue_voq_3.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Case testQosSaiLossyQueueVoqMultiSrc

vanguard(Q200 longlink, default voq) skipped:

-------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoqMultiSrc.xml --------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
01:57:15 __init__.pytest_terminal_summary         L0064 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
SKIPPED [1] /data/tests/qos/qos_sai_base.py:2125: This test is skipped for egress asic HBM enabled systems.
=================================================================================== 1 skipped in 355.75 seconds ===================================================================================

lancer(Q200 shortlink, fair voq) passed:

============================================================================================= PASSES ==============================================================================================
_____________________________________________________________________ TestQosSai.testQosSaiLossyQueueVoqMultiSrc[single_asic] _____________________________________________________________________
-------------------------------------------------- generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoqMultiSrc.xml --------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
00:53:24 __init__.pytest_terminal_summary         L0064 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoqMultiSrc[single_asic]
=================================================================================== 1 passed in 389.64 seconds ====================================================================================

Case testQosSaiLossyQueueVoq

Vanguard skipped lossy_queue_voq_1, passed lossy_queue_voq_2.

============================================================================================= PASSES ==============================================================================================
________________________________________________________________ TestQosSai.testQosSaiLossyQueueVoq[single_asic-lossy_queue_voq_2] ________________________________________________________________
------------------------------------------------------ generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoq.xml ------------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
01:17:13 __init__.pytest_terminal_summary         L0064 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoq[single_asic-lossy_queue_voq_2]
SKIPPED [1] /data/tests/qos/test_qos_sai.py:1135: LossyQueueVoq: This test is skipped since cisco-8000 T2 doesn't support split-voq.
============================================================================== 1 passed, 1 skipped in 608.24 seconds ==============================================================================

Lancer skipped lossy_queue_voq_1, passed lossy_queue_voq_2.

============================================================================================= PASSES ==============================================================================================
________________________________________________________________ TestQosSai.testQosSaiLossyQueueVoq[single_asic-lossy_queue_voq_2] ________________________________________________________________
------------------------------------------------------ generated xml file: /tmp/qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoq.xml ------------------------------------------------------
INFO:root:Can not get Allure report URL. Please check logs
------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------
01:32:15 __init__.pytest_terminal_summary         L0064 INFO   | Can not get Allure report URL. Please check logs
===================================================================================== short test summary info =====================================================================================
PASSED qos/test_qos_sai.py::TestQosSai::testQosSaiLossyQueueVoq[single_asic-lossy_queue_voq_2]
SKIPPED [1] /data/tests/qos/test_qos_sai.py:1135: LossyQueueVoq: This test is skipped since cisco-8000 T2 doesn't support split-voq.
============================================================================== 1 passed, 1 skipped in 615.21 seconds ==============================================================================

Any platform specific information?

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

Documentation

Signed-off-by: Zhixin Zhu <zhixzhu@cisco.com>
@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...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/qos/test_qos_sai.py:2080:14: E111 indentation is not a multiple of 4
tests/qos/test_qos_sai.py:2080:14: E117 over-indented
tests/qos/test_qos_sai.py:2081:18: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:5366:1: E302 expected 2 blank lines, found 1
tests/saitests/py3/sai_qos_tests.py:5402:121: E501 line too long (148 > 120 characters)
tests/saitests/py3/sai_qos_tests.py:5409:121: E501 line too long (130 > 120 characters)
tests/saitests/py3/sai_qos_tests.py:5451:67: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:5460:121: E501 line too long (122 > 120 characters)
tests/saitests/py3/sai_qos_tests.py:5468:62: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:5505:121: E501 line too long (129 > 120 characters)
tests/saitests/py3/sai_qos_tests.py:5506:121: E501 line too long (133 > 120 characters)
...
[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>

Signed-off-by: Zhixin Zhu <zhixzhu@cisco.com>
@zhixzhu zhixzhu marked this pull request as ready for review November 24, 2023 05:45
@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...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/saitests/py3/sai_qos_tests.py:5456:67: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:5474:62: E128 continuation line under-indented for visual indent

flake8...............................................(no files to check)Skipped
check conditional mark sort..............................................Failed
- hook id: check-conditional-mark-sort
- exit code: 1

The entries in tests/common/plugins/conditional_mark/tests_mark_conditions.yaml tests/common/plugins/conditional_mark/tests_mark_conditions_acl.yaml tests/common/plugins/conditional_mark/tests_mark_conditions_drop_packets.yaml tests/common/plugins/conditional_mark/tests_mark_conditions_platform_tests.yaml are not sorted in alphabetic order.

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>

Signed-off-by: Zhixin Zhu <zhixzhu@cisco.com>
@zhixzhu zhixzhu changed the title Add case to test lossy fair-voq [T2] Add case to test lossy fair-voq Jan 19, 2024
@abdosi
Copy link
Contributor

abdosi commented Feb 2, 2024

Please resolve the conflict.

Signed-off-by: Zhixin Zhu <zhixzhu@cisco.com>
@zhixzhu
Copy link
Contributor Author

zhixzhu commented Feb 3, 2024

@abdosi conflicts resolved.

@abdosi abdosi merged commit a54467c into sonic-net:master Feb 9, 2024
13 checks passed
@XuChen-MSFT XuChen-MSFT mentioned this pull request Feb 19, 2024
8 tasks
StormLiangMS pushed a commit that referenced this pull request Feb 20, 2024
What is the motivation for this PR?
PR #10382 caused below two KeyError:

    @pytest.fixture(scope="function", autouse=False)
    def skip_pacific_dst_asic(self, dutConfig):
>       if dutConfig['dstDutAsic'] == "pac":
E       KeyError: 'dstDutAsic'
        if "wm_pg_shared_lossless" in pgProfile:
            pktsNumFillShared = qosConfig[pgProfile]["pkts_num_trig_pfc"]
        elif "wm_pg_shared_lossy" in pgProfile:
>           if dutConfig['dstDutAsic'] == "pac":
E           KeyError: 'dstDutAsic'
and remove duplicated code in PR #11553 and PR #10838, it will cause pre-commit failure

    @pytest.fixture(scope="function", autouse=False)
    def skip_longlink(self, dutQosConfig):
        portSpeedCableLength = dutQosConfig["portSpeedCableLength"]
        match = re.search("_([0-9]*)m", portSpeedCableLength)
        if match and int(match.group(1)) > 2000:
            pytest.skip(
                "This test is skipped for longlink.")
        yield
        return
How did you do it?
fix keyerror and remove duplicated code
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 20, 2024
What is the motivation for this PR?
PR sonic-net#10382 caused below two KeyError:

    @pytest.fixture(scope="function", autouse=False)
    def skip_pacific_dst_asic(self, dutConfig):
>       if dutConfig['dstDutAsic'] == "pac":
E       KeyError: 'dstDutAsic'
        if "wm_pg_shared_lossless" in pgProfile:
            pktsNumFillShared = qosConfig[pgProfile]["pkts_num_trig_pfc"]
        elif "wm_pg_shared_lossy" in pgProfile:
>           if dutConfig['dstDutAsic'] == "pac":
E           KeyError: 'dstDutAsic'
and remove duplicated code in PR sonic-net#11553 and PR sonic-net#10838, it will cause pre-commit failure

    @pytest.fixture(scope="function", autouse=False)
    def skip_longlink(self, dutQosConfig):
        portSpeedCableLength = dutQosConfig["portSpeedCableLength"]
        match = re.search("_([0-9]*)m", portSpeedCableLength)
        if match and int(match.group(1)) > 2000:
            pytest.skip(
                "This test is skipped for longlink.")
        yield
        return
How did you do it?
fix keyerror and remove duplicated code
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 20, 2024
What is the motivation for this PR?
PR sonic-net#10382 caused below two KeyError:

    @pytest.fixture(scope="function", autouse=False)
    def skip_pacific_dst_asic(self, dutConfig):
>       if dutConfig['dstDutAsic'] == "pac":
E       KeyError: 'dstDutAsic'
        if "wm_pg_shared_lossless" in pgProfile:
            pktsNumFillShared = qosConfig[pgProfile]["pkts_num_trig_pfc"]
        elif "wm_pg_shared_lossy" in pgProfile:
>           if dutConfig['dstDutAsic'] == "pac":
E           KeyError: 'dstDutAsic'
and remove duplicated code in PR sonic-net#11553 and PR sonic-net#10838, it will cause pre-commit failure

    @pytest.fixture(scope="function", autouse=False)
    def skip_longlink(self, dutQosConfig):
        portSpeedCableLength = dutQosConfig["portSpeedCableLength"]
        match = re.search("_([0-9]*)m", portSpeedCableLength)
        if match and int(match.group(1)) > 2000:
            pytest.skip(
                "This test is skipped for longlink.")
        yield
        return
How did you do it?
fix keyerror and remove duplicated code
mssonicbld pushed a commit that referenced this pull request Feb 20, 2024
What is the motivation for this PR?
PR #10382 caused below two KeyError:

    @pytest.fixture(scope="function", autouse=False)
    def skip_pacific_dst_asic(self, dutConfig):
>       if dutConfig['dstDutAsic'] == "pac":
E       KeyError: 'dstDutAsic'
        if "wm_pg_shared_lossless" in pgProfile:
            pktsNumFillShared = qosConfig[pgProfile]["pkts_num_trig_pfc"]
        elif "wm_pg_shared_lossy" in pgProfile:
>           if dutConfig['dstDutAsic'] == "pac":
E           KeyError: 'dstDutAsic'
and remove duplicated code in PR #11553 and PR #10838, it will cause pre-commit failure

    @pytest.fixture(scope="function", autouse=False)
    def skip_longlink(self, dutQosConfig):
        portSpeedCableLength = dutQosConfig["portSpeedCableLength"]
        match = re.search("_([0-9]*)m", portSpeedCableLength)
        if match and int(match.group(1)) > 2000:
            pytest.skip(
                "This test is skipped for longlink.")
        yield
        return
How did you do it?
fix keyerror and remove duplicated code
mssonicbld pushed a commit that referenced this pull request Feb 20, 2024
What is the motivation for this PR?
PR #10382 caused below two KeyError:

    @pytest.fixture(scope="function", autouse=False)
    def skip_pacific_dst_asic(self, dutConfig):
>       if dutConfig['dstDutAsic'] == "pac":
E       KeyError: 'dstDutAsic'
        if "wm_pg_shared_lossless" in pgProfile:
            pktsNumFillShared = qosConfig[pgProfile]["pkts_num_trig_pfc"]
        elif "wm_pg_shared_lossy" in pgProfile:
>           if dutConfig['dstDutAsic'] == "pac":
E           KeyError: 'dstDutAsic'
and remove duplicated code in PR #11553 and PR #10838, it will cause pre-commit failure

    @pytest.fixture(scope="function", autouse=False)
    def skip_longlink(self, dutQosConfig):
        portSpeedCableLength = dutQosConfig["portSpeedCableLength"]
        match = re.search("_([0-9]*)m", portSpeedCableLength)
        if match and int(match.group(1)) > 2000:
            pytest.skip(
                "This test is skipped for longlink.")
        yield
        return
How did you do it?
fix keyerror and remove duplicated code
@XuChen-MSFT
Copy link
Contributor

have duplicated impl for function "skip_longlink" in both PR #11553 and PR #10838,
already fixed in master branch, please remove duplicated code when cherry pick

@abdosi
Copy link
Contributor

abdosi commented Mar 1, 2024

have duplicated impl for function "skip_longlink" in both PR #11553 and PR #10838, already fixed in master branch, please remove duplicated code when cherry pick

@zhixzhu to handle this please create PR for 202305/202311 directly.

@zhixzhu
Copy link
Contributor Author

zhixzhu commented Mar 5, 2024

To avoid duplicate function "skip_longlink", here is the PR for 202305: #11904
Didn't see function "skip_longlink" in 202311 branch.

@zhixzhu zhixzhu deleted the lossyqueue_fair_voq_master branch March 5, 2024 19:03
wangxin pushed a commit that referenced this pull request Mar 7, 2024
Double commit #10838
1, Add a new case to test lossy fair-voq.
2, Add lossy_queue_voq_2 and lossy_queue_voq_3 to qos_param_generator.py.
Default-voq and fair-voq will pass lossy_queue_voq_2, fair-voq and split-voq will pass lossy_queue_voq_3.

Signed-off-by: Zhixin Zhu <zhixzhu@cisco.com>
@XuChen-MSFT
Copy link
Contributor

@kevinskwang can you help to approve cherry-pick to 202311 branch?

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Sep 6, 2024
1, Add a new case to test lossy fair-voq.
2, Add lossy_queue_voq_2 and lossy_queue_voq_3 to qos_param_generator.py.
Default-voq and fair-voq will pass lossy_queue_voq_2, fair-voq and split-voq will pass lossy_queue_voq_3.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #14447

@mssonicbld
Copy link
Collaborator

@zhixzhu PR conflicts with 202405 branch

@XuChen-MSFT
Copy link
Contributor

XuChen-MSFT commented Sep 13, 2024

@zhixzhu
can you re-create PR to manually double commit to 202311 branch,
rather than create an additional patch for its automate PR #14447

@XuChen-MSFT
Copy link
Contributor

This PR had been included in 202305 and 202405.
For 202311, manually cherry pick by PR #14584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants