Skip to content

Update qos dscp mapping script#20429

Merged
roy-sror merged 1 commit intosonic-net:masterfrom
echuawu:qos_remap_update
Oct 28, 2025
Merged

Update qos dscp mapping script#20429
roy-sror merged 1 commit intosonic-net:masterfrom
echuawu:qos_remap_update

Conversation

@echuawu
Copy link
Contributor

@echuawu echuawu commented Aug 28, 2025

Description of PR

Optimize the tests/qos/test_qos_dscp_mapping.py test to dramatically reduce the running time dramatically.
If there are 4 upstream links in the topology, for the basic traffic test, the running time would be reduced by 75% compared with the original script.
If there are 8 upstream links in the topology, for the basic traffic test, the running time would be reduced over 85% compared with the original script.

Script modifications:

  1. Optimize the test cases and use one case to do the two dscp mode test
  2. Change the teardown step to a fixture to make sure it must be executed
  3. Make sure dscp_to_tc_map is AZURE
  4. Add warm reboot action to enhance the test coverage
  5. Remove skip condition for mellanox
  6. Optimize the packet validation flow which dramatically reduced the execution time
  7. Optimize the queue counter check flow to reduce the queue counter check execution time
  8. Add port and dscp mode as well as route check to enhance the script debuggability
  9. Use completeness_level, by default the script would run warm reboot test
    if completeness_level had been set as basic, it would skip warm reboot test and the function test
    after warm reboot action

Summary:
Fixes # (issue)

Type of change

  • 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?

Enhance the tests/qos/test_qos_dscp_mapping.py

How did you do it?

  1. Optimize the test cases and use one case to do the two dscp mode test
  2. Change the teardown step to a fixture to make sure it must be executed
  3. Make sure dscp_to_tc_map is AZURE
  4. Add warm reboot action to enhance the test coverage
  5. Remove skip condition for mellanox
  6. Optimize the packet validation flow which dramatically reduced the execution time
  7. Optimize the queue counter check flow to reduce the queue counter check execution time
  8. Add port and dscp mode as well as route check to enhance the script debuggability
  9. Use completeness_level, by default the script would run warm reboot test
    if completeness_level had been set as basic, it would skip warm reboot test and the function test
    after warm reboot action

How did you verify/test it?

Run it locally

Any platform specific information?

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

Documentation

@echuawu echuawu requested a review from wangxin as a code owner August 28, 2025 03:00
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu
Copy link
Contributor Author

echuawu commented Aug 28, 2025

Hi @wangxin ,
During PR checker running, there is a common issue regarding the testbed, please help check.

==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.250.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /agent/_work/_temp/2de78f50-e43e-48d0-94f6-d11072f1eb53.sh
Step: Prepare Testbed
Preparing the testbed(add-topo, deploy-mg) may take 15-30 minutes. Before the testbed is ready, the progress of the test plan keeps displayed as 0, please be patient
TEST_PLAN_ID_LIST: 68b0034e33016fb86d910830
Please visit Elastictest page https://elastictest.org/scheduler/testplan/68b0034e33016fb86d910830 for detailed test plan progress 
[test_plan.py] poll PREPARE_TESTBED status
Test plan utils parameters: Namespace(action='poll', test_plan_id='68b0034e33016fb86d910830', expected_state='PREPARE_TESTBED', expected_result=None, interval=60, timeout=-1)
Polling progress and status of test plan at https://elastictest.org/scheduler/testplan/68b0034e33016fb86d910830
Polling interval: 60 seconds
az login --identity --client-id
Az login successfully. Login time: 2025-08-28 07:21:50.368095+00:00
Get token successfully. Token will expire on 2025-08-29 06:42:11.000000.
Test plan id: 68b0034e33016fb86d910830, status: PREPARE_TESTBED, expected_status: PREPARE_TESTBED, elapsed: 0 seconds
Test plan id: 68b0034e33016fb86d910830, status: PREPARE_TESTBED, expected_status: PREPARE_TESTBED, elapsed: 61 seconds
Test plan id: 68b0034e33016fb86d910830, status: FAILED, expected_status: PREPARE_TESTBED, elapsed: 121 seconds
Test summary:
{
    "errors": 0,
    "failures": 0,
    "skipped": 0,
    "tests": 0,
    "times": 0.0,
    "xfails": 0,
    "passes": 0,
    "err_msg": [],
    "warn_msg": [
        "Testbed Unhealthy: vms-kvm-four-asic-t1-lag_250018 was kicked out: PrepareTestbedFailed: . 2025-08-28 07:22:20 UTC",
        "Testbed Unhealthy: vms-kvm-four-asic-t1-lag_250055 was kicked out: PrepareTestbedFailed: . 2025-08-28 07:22:20 UTC",
        "Testbed Unhealthy: vms-kvm-four-asic-t1-lag_250049 was kicked out: PrepareTestbedFailed: . 2025-08-28 07:22:20 UTC",
        "Testbed Unhealthy: vms-kvm-four-asic-t1-lag_250019 was kicked out: PrepareTestbedFailed: . 2025-08-28 07:22:33 UTC"
    ],
    "tests_ignore_retries": 0,
    "passes_ignore_retries": 0,
    "errors_ignore_retries": 0,
    "failures_ignore_retries": 0,
    "times_ignore_retries": 0.0
}
Error type: PREPARE_TESTBED_FAILED
Error message: Prepare testbed failed: testbed_q_sonic-elastictest-prod-vmss-D16s-v3_249993 for PREPARE_TESTBED_FAILED, testbed is: vms-kvm-four-asic-t1-lag_249993, cmd is: Cleanup env
Operation failed with exception: Exception('Test plan id: 68b0034e33016fb86d910830, status: FAILED, result: FAILED, Elapsed 121 seconds. Check https://elastictest.org/scheduler/testplan/68b0034e33016fb86d910830 for test plan status')

##[error]Bash exited with code '3'.
Finishing: Prepare Testbed

@echuawu
Copy link
Contributor Author

echuawu commented Aug 28, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu
Copy link
Contributor Author

echuawu commented Aug 29, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu
Copy link
Contributor Author

echuawu commented Sep 1, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu
Copy link
Contributor Author

echuawu commented Sep 2, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu
Copy link
Contributor Author

echuawu commented Sep 4, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu
Copy link
Contributor Author

echuawu commented Sep 10, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Change-Id: I7c3c49e3b956457c0728468105ae819555992bae
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@roy-sror roy-sror merged commit 2a9038d into sonic-net:master Oct 28, 2025
19 checks passed
dcaugher pushed a commit to dcaugher/sonic-mgmt that referenced this pull request Nov 12, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action
dcaugher pushed a commit to dcaugher/sonic-mgmt that referenced this pull request Nov 12, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action
vikumarks pushed a commit to vikumarks/sonic-mgmt that referenced this pull request Dec 1, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: vikumarks <[email protected]>
albertovillarreal-keys pushed a commit to albertovillarreal-keys/sonic-mgmt that referenced this pull request Dec 2, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Alberto Villarreal <[email protected]>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: opcoder0 <[email protected]>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Dec 11, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: selldinesh <[email protected]>
echuawu added a commit to echuawu/sonic-mgmt that referenced this pull request Dec 12, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action
saravanan-nexthop pushed a commit to saravanan-nexthop/sonic-mgmt that referenced this pull request Dec 15, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Saravanan <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action
yifan-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Jan 14, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: YiFan Wang <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Guy Shemesh <[email protected]>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Jan 28, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Lakshmi Yarramaneni <[email protected]>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Jan 29, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Yael Tzur <[email protected]>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 13, 2026
1.Optimize the test cases and use one case to do the two dscp mode test
2.Change the teardown step to a fixture to make sure it must be executed
3.Make sure dscp_to_tc_map is AZURE
4.Add warm reboot action to enhance the test coverage
5.Remove skip condition for mellanox
6.Optimize the packet validation flow which dramatically reduce the execution time
7.Optimize the queue counter check flow to reduce the queue counter check execution time
8.Add port and dscp mode as well as route check to enhance the script debuggability
9.Use completeness_level, by default the script would run warm reboot test
   if completeness_level had been set as basic, it would skip warm reboot test and the function test
   after warm reboot action

Signed-off-by: Raghavendran Ramanathan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants