Fix fixture invocation order in qos_sai_base.py to prevent teardown failure.#17180
Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom Feb 27, 2025
Merged
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
@vivekverma-arista PR conflicts with 202311 branch |
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Feb 27, 2025
…ailure. (sonic-net#17180) Approach What is the motivation for this PR? Regression due to: [action] [PR:15501] change swapsyncd to module level. sonic-net#15938 This PR changes the scope of swapSyncd_on_selected_duts and dut_disable_ipv6 from class to module. This was to reduce execution time in T2. The fixtures used to fire multiple times for chassis. There is a fixture in global conftest, core_dump_and_config_check which in its teardown restores DUT config to the state as it was prior to the test. https://github.com/sonic-net/sonic-mgmt/blob/202411/tests/conftest.py#L2542 All the three fixtures are currently autouse and module scoped and core_dump_and_config_check and dut_disable_ipv6 share no explicit dependencies hence they will fire in any order. If the teardown of core_dump_and_config_check happens before dut_disable_ipv6 has restored ipv6 on the DUT, this failure will be seen. How did you do it? The proposed fix will be to make swapSyncd_on_selected_duts request core_dump_and_config_check. This way setup of core_dump_and_config_check will happen before qos_sai_base fixtures and its teardown will happen after the teardown of qos_sai_base fixtures. How did you verify/test it? Ran qos/test_qos_sai.py with dualtor topology on Arista-7050CX3 and no error was seen. SKIPPED [3] qos/test_qos_sai.py:1559: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1635: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1742: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1851: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1935: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:2059: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:2120: multi-dut is not supported on T0 topologies ============================= 15 passed, 220 skipped, 1 warning in 4656.78s (1:17:36) ============================== Any platform specific information? Supported testbed topology if it's a new test case?
Collaborator
|
Cherry-pick PR to 202411: #17198 |
10 tasks
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Feb 27, 2025
…ailure. (sonic-net#17180) Approach What is the motivation for this PR? Regression due to: [action] [PR:15501] change swapsyncd to module level. sonic-net#15938 This PR changes the scope of swapSyncd_on_selected_duts and dut_disable_ipv6 from class to module. This was to reduce execution time in T2. The fixtures used to fire multiple times for chassis. There is a fixture in global conftest, core_dump_and_config_check which in its teardown restores DUT config to the state as it was prior to the test. https://github.com/sonic-net/sonic-mgmt/blob/202411/tests/conftest.py#L2542 All the three fixtures are currently autouse and module scoped and core_dump_and_config_check and dut_disable_ipv6 share no explicit dependencies hence they will fire in any order. If the teardown of core_dump_and_config_check happens before dut_disable_ipv6 has restored ipv6 on the DUT, this failure will be seen. How did you do it? The proposed fix will be to make swapSyncd_on_selected_duts request core_dump_and_config_check. This way setup of core_dump_and_config_check will happen before qos_sai_base fixtures and its teardown will happen after the teardown of qos_sai_base fixtures. How did you verify/test it? Ran qos/test_qos_sai.py with dualtor topology on Arista-7050CX3 and no error was seen. SKIPPED [3] qos/test_qos_sai.py:1559: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1635: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1742: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1851: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1935: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:2059: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:2120: multi-dut is not supported on T0 topologies ============================= 15 passed, 220 skipped, 1 warning in 4656.78s (1:17:36) ============================== Any platform specific information? Supported testbed topology if it's a new test case?
Collaborator
|
Cherry-pick PR to 202405: #17199 |
10 tasks
Contributor
Author
We don't need this in 202311 as the PR which caused regression was only backported to 202405 and 202411 |
nissampa
pushed a commit
to nissampa/sonic-mgmt_dpu_test
that referenced
this pull request
Mar 4, 2025
…ailure. (sonic-net#17180) Approach What is the motivation for this PR? Regression due to: [action] [PR:15501] change swapsyncd to module level. sonic-net#15938 This PR changes the scope of swapSyncd_on_selected_duts and dut_disable_ipv6 from class to module. This was to reduce execution time in T2. The fixtures used to fire multiple times for chassis. There is a fixture in global conftest, core_dump_and_config_check which in its teardown restores DUT config to the state as it was prior to the test. https://github.com/sonic-net/sonic-mgmt/blob/202411/tests/conftest.py#L2542 All the three fixtures are currently autouse and module scoped and core_dump_and_config_check and dut_disable_ipv6 share no explicit dependencies hence they will fire in any order. If the teardown of core_dump_and_config_check happens before dut_disable_ipv6 has restored ipv6 on the DUT, this failure will be seen. How did you do it? The proposed fix will be to make swapSyncd_on_selected_duts request core_dump_and_config_check. This way setup of core_dump_and_config_check will happen before qos_sai_base fixtures and its teardown will happen after the teardown of qos_sai_base fixtures. How did you verify/test it? Ran qos/test_qos_sai.py with dualtor topology on Arista-7050CX3 and no error was seen. SKIPPED [3] qos/test_qos_sai.py:1559: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1635: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1742: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1851: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1935: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:2059: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:2120: multi-dut is not supported on T0 topologies ============================= 15 passed, 220 skipped, 1 warning in 4656.78s (1:17:36) ============================== Any platform specific information? Supported testbed topology if it's a new test case?
mssonicbld
pushed a commit
that referenced
this pull request
Mar 9, 2025
…ailure. (#17180) Approach What is the motivation for this PR? Regression due to: [action] [PR:15501] change swapsyncd to module level. #15938 This PR changes the scope of swapSyncd_on_selected_duts and dut_disable_ipv6 from class to module. This was to reduce execution time in T2. The fixtures used to fire multiple times for chassis. There is a fixture in global conftest, core_dump_and_config_check which in its teardown restores DUT config to the state as it was prior to the test. https://github.com/sonic-net/sonic-mgmt/blob/202411/tests/conftest.py#L2542 All the three fixtures are currently autouse and module scoped and core_dump_and_config_check and dut_disable_ipv6 share no explicit dependencies hence they will fire in any order. If the teardown of core_dump_and_config_check happens before dut_disable_ipv6 has restored ipv6 on the DUT, this failure will be seen. How did you do it? The proposed fix will be to make swapSyncd_on_selected_duts request core_dump_and_config_check. This way setup of core_dump_and_config_check will happen before qos_sai_base fixtures and its teardown will happen after the teardown of qos_sai_base fixtures. How did you verify/test it? Ran qos/test_qos_sai.py with dualtor topology on Arista-7050CX3 and no error was seen. SKIPPED [3] qos/test_qos_sai.py:1559: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1635: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1742: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1851: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1935: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:2059: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:2120: multi-dut is not supported on T0 topologies ============================= 15 passed, 220 skipped, 1 warning in 4656.78s (1:17:36) ============================== Any platform specific information? Supported testbed topology if it's a new test case?
nnelluri-cisco
pushed a commit
to nnelluri-cisco/sonic-mgmt
that referenced
this pull request
Mar 15, 2025
…ailure. (sonic-net#17180) Approach What is the motivation for this PR? Regression due to: [action] [PR:15501] change swapsyncd to module level. sonic-net#15938 This PR changes the scope of swapSyncd_on_selected_duts and dut_disable_ipv6 from class to module. This was to reduce execution time in T2. The fixtures used to fire multiple times for chassis. There is a fixture in global conftest, core_dump_and_config_check which in its teardown restores DUT config to the state as it was prior to the test. https://github.com/sonic-net/sonic-mgmt/blob/202411/tests/conftest.py#L2542 All the three fixtures are currently autouse and module scoped and core_dump_and_config_check and dut_disable_ipv6 share no explicit dependencies hence they will fire in any order. If the teardown of core_dump_and_config_check happens before dut_disable_ipv6 has restored ipv6 on the DUT, this failure will be seen. How did you do it? The proposed fix will be to make swapSyncd_on_selected_duts request core_dump_and_config_check. This way setup of core_dump_and_config_check will happen before qos_sai_base fixtures and its teardown will happen after the teardown of qos_sai_base fixtures. How did you verify/test it? Ran qos/test_qos_sai.py with dualtor topology on Arista-7050CX3 and no error was seen. SKIPPED [3] qos/test_qos_sai.py:1559: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1635: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1742: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1851: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1935: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:2059: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:2120: multi-dut is not supported on T0 topologies ============================= 15 passed, 220 skipped, 1 warning in 4656.78s (1:17:36) ============================== Any platform specific information? Supported testbed topology if it's a new test case?
mssonicbld
pushed a commit
that referenced
this pull request
May 29, 2025
…ailure. (#17180) Approach What is the motivation for this PR? Regression due to: [action] [PR:15501] change swapsyncd to module level. #15938 This PR changes the scope of swapSyncd_on_selected_duts and dut_disable_ipv6 from class to module. This was to reduce execution time in T2. The fixtures used to fire multiple times for chassis. There is a fixture in global conftest, core_dump_and_config_check which in its teardown restores DUT config to the state as it was prior to the test. https://github.com/sonic-net/sonic-mgmt/blob/202411/tests/conftest.py#L2542 All the three fixtures are currently autouse and module scoped and core_dump_and_config_check and dut_disable_ipv6 share no explicit dependencies hence they will fire in any order. If the teardown of core_dump_and_config_check happens before dut_disable_ipv6 has restored ipv6 on the DUT, this failure will be seen. How did you do it? The proposed fix will be to make swapSyncd_on_selected_duts request core_dump_and_config_check. This way setup of core_dump_and_config_check will happen before qos_sai_base fixtures and its teardown will happen after the teardown of qos_sai_base fixtures. How did you verify/test it? Ran qos/test_qos_sai.py with dualtor topology on Arista-7050CX3 and no error was seen. SKIPPED [3] qos/test_qos_sai.py:1559: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1635: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1742: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:1851: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:1935: multi-dut is not supported on T0 topologies SKIPPED [6] qos/test_qos_sai.py:2059: multi-dut is not supported on T0 topologies SKIPPED [3] qos/test_qos_sai.py:2120: multi-dut is not supported on T0 topologies ============================= 15 passed, 220 skipped, 1 warning in 4656.78s (1:17:36) ============================== Any platform specific information? Supported testbed topology if it's a new test case?
sdszhang
pushed a commit
to sdszhang/sonic-mgmt
that referenced
this pull request
Jun 14, 2025
Code sync sonic-net/sonic-mgmt:202411 => 202412 ``` * 1f86dab (HEAD -> code-sync-202412, origin/code-sync-202412) r12f 250610:2314 - Merge remote-tracking branch 'base/202411' into code-sync-202412 |\ | * 2ba104e (base/202411) xwjiang-ms 250610:1604 - [202411] Use ceos 4.32.5M as default ceos image version (sonic-net#18878) | * 5fa5cda Longxiang Lyu 250610:0818 - [202411][dualtor-aa] Add `dualtor_aa` support to `test_nvgre_hash` (sonic-net#18883) | * afecbbf zitingguo-ms 250609:1334 - [Cherry-pick][ACL] Collect all upstream ports and Include service port into upstream neighbors in ACL tests (sonic-net#18847) | * 2e4247b pragnya-arista 250609:0632 - [202411][sonic-mgmt]Fix decap/test_subnet_decap.py::test_vlan_subnet_decap (sonic-net#18778) | * 0bfc7a8 Longxiang Lyu 250606:0943 - [dualtor-io] Fix duplication merge condition (sonic-net#18828) | * 52d3771 Zhaohui Sun 250605:2046 - Restore configuration after vxlan module (sonic-net#18714) | * 3d0922f Yaqiang Zhu 250605:2259 - [202411][pktgen] Skip test_pktgen in m0/mx/m1 (sonic-net#18822) | * 3de20a6 Zhaohui Sun 250516:1325 - Add secondary subnet config for t0 topologies (sonic-net#18399) | * bb3e0f9 Zhaohui Sun 250605:1416 - Xfail test_dir_bcast.py due to known issue on Broadcom platform (sonic-net#18787) | * 158c562 Justin Wong 250604:2058 - Add snmp lldp state check after config_reload (sonic-net#18805) | * e39c891 eyakubch 250605:0415 - bug: added fast reboot into reboot_type check (sonic-net#18551) | * 8c7dd3b Cong Hou 250604:1433 - Remove the skip/xfail for the dualtor_io link failure test (sonic-net#18712) | * 5dbc53d mssonicbld 250604:0952 - [dualtor-io] fix dualtor sniffer start slow issue (sonic-net#18758) (sonic-net#18776) | * 105cdf6 StormLiangMS 250603:0844 - [CRM AVAILABLE] To enhance the crm tests for TD3 and Cisco devices (sonic-net#18733) | * 4251b38 andywongarista 250601:1828 - Add restore_image fixture to test_multi_hop_upgrade_path (sonic-net#18230) (sonic-net#18532) | * 85a55d8 Longxiang Lyu 250528:2313 - [dualtor] Fix `test_orchagent_slb` (sonic-net#18666) | * 95a8764 Vivek Verma 250227:0656 - Fix fixture invocation order in qos_sai_base.py to prevent teardown failure. (sonic-net#17180) | * 9a72265 Justin Wong 250514:1844 - Add PTF parameter for ceos neighbor lacp multiplier (sonic-net#18215) | * cd1375d Longxiang Lyu 250529:1029 - [dualtor-io] Validate and recover active-active setup (sonic-net#18675) | * 763c1b3 Longxiang Lyu 250528:2314 - [dualtor] Fix loganalyzer not exist issue (sonic-net#18674) ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary: Fix fixture invocation order in qos_sai_base.py to prevent teardown failure.
Fixes #460
Type of change
Back port request
Approach
What is the motivation for this PR?
Regression due to: [action] [PR:15501] change swapsyncd to module level. #15938
This PR changes the scope of swapSyncd_on_selected_duts and dut_disable_ipv6 from class to module. This was to reduce execution time in T2. The fixtures used to fire multiple times for chassis.
There is a fixture in global conftest,
core_dump_and_config_checkwhich in its teardown restores DUT config to the state as it was prior to the test. https://github.com/sonic-net/sonic-mgmt/blob/202411/tests/conftest.py#L2542All the three fixtures are currently autouse and module scoped and core_dump_and_config_check and dut_disable_ipv6 share no explicit dependencies hence they will fire in any order.
If the teardown of core_dump_and_config_check happens before dut_disable_ipv6 has restored ipv6 on the DUT, this failure will be seen.
How did you do it?
The proposed fix will be to make swapSyncd_on_selected_duts request core_dump_and_config_check. This way setup of core_dump_and_config_check will happen before qos_sai_base fixtures and its teardown will happen after the teardown of qos_sai_base fixtures.
How did you verify/test it?
Ran
qos/test_qos_sai.pywith dualtor topology on Arista-7050CX3 and no error was seen.Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation