Skip to content

[link flap] replace bring_up_fanout_interfaces with in place restoration#2484

Merged
yxieca merged 1 commit intosonic-net:masterfrom
yxieca:linkflap
Nov 10, 2020
Merged

[link flap] replace bring_up_fanout_interfaces with in place restoration#2484
yxieca merged 1 commit intosonic-net:masterfrom
yxieca:linkflap

Conversation

@yxieca
Copy link
Collaborator

@yxieca yxieca commented Nov 7, 2020

Description of PR

Summary:
Improve efficiency of link flap tests.

Type of change

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

Approach

What is the motivation for this PR?

bring_up_fanout_interfaces is retoring all fanout ports, which takes long time and unnecessary. The tests will only ever shutdown one fanout port then restore it. If anything fails, there is only up to one fanout port to be restored.

How did you do it?

replace bring_up_fanout_interfaces with a in place restoration in the helper function toggles fanout switch port.

Signed-off-by: Ying Xie ying.xie@microsoft.com

How did you verify/test it?

Run link flap tests.

platform linux2 -- Python 2.7.12, pytest-4.6.5, py-1.9.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/src/sonic-mgmt/tests, inifile: pytest.ini
plugins: ansible-2.2.2, forked-1.3.0, xdist-1.28.0, html-1.22.1, repeat-0.8.0, metadata-1.10.0
collected 33 items ------------------------------
==============================
platform_tests/link_flap/test_cont_link_flap.py::TestContLinkFlap::test_cont_link_flap PASSED [ 3%]
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet8] PASSED [ 6%] ==============================
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet0] PASSED [ 9%] mp/logs-01 -c platform_tests/l
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet4] PASSED [ 12%]
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet108] PASSED [ 15%]
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet100] PASSED [ 18%] ore team. Support for it is no
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet104] PASSED [ 21%]
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet68] PASSED [ 24%]
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet96] PASSED [ 27%] ==============================
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet124] PASSED [ 30%]
platform_tests/link_flap/test_link_flap.py::test_link_flap[str-dx010-acs-1|Ethernet92] PASSED [ 33%]

@lgtm-com
Copy link

lgtm-com bot commented Nov 7, 2020

This pull request introduces 3 alerts when merging 4d9ed65027cbb279ae0991a0f6e7963b06a9b158 into 262246c - view on LGTM.com

new alerts:

  • 3 for Unused import

@wangxin
Copy link
Collaborator

wangxin commented Nov 10, 2020

Could you also address the LGTM alerts 3 for Unused import?

@yxieca
Copy link
Collaborator Author

yxieca commented Nov 10, 2020

Could you also address the LGTM alerts 3 for Unused import?

sure, will do. I'll have to solve merge conflict after #2494. which I want to merge first. Will do that at the same time.

bring_up_fanout_interfaces is retoring all fanout ports, which takes long
time and unnecessary. The tests will only ever shutdown one fanout port
then restore it. If anything fails, there is only up to one fanout port
to be restored.

replace bring_up_fanout_interfaces with a in place retoration in the
helper function toggles fanout switch port.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@yxieca yxieca merged commit f031f32 into sonic-net:master Nov 10, 2020
@yxieca yxieca deleted the linkflap branch November 10, 2020 05:17
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
swss:
* f28d6622 2023-01-25 | [portinit] Do not call GET on SAI_PORT_ATTR_SPEED when AUTONEG is enabled (sonic-net#2484) (sonic-net#2639) (github/202012, 202012) [Ying Xie]
* 217f7f00 2023-01-21 | Cherry pick of sonic-net/sonic-swss#2589 (sonic-net#2627) [siqbal1986]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
swss:
* 6902a98 2022-12-13 | [muxorch] Skip programming SoC IP kernel tunnel route (sonic-net#2557) (HEAD -> 202205) [Longxiang Lyu]
* 8a86404 2022-12-07 | [portinit] Do not call GET on SAI_PORT_ATTR_SPEED when AUTONEG is enabled (sonic-net#2484) [Vaibhav Hemant Dixit]
* d16f51d 2022-12-07 | Revert "sonic-swss: Fix orchagent crash in generateQueueMapPerPort. (sonic-net#2552)" (github/202205) [Ying Xie]
* abc6a81 2022-12-05 | sonic-swss: Fix orchagent crash in generateQueueMapPerPort. (sonic-net#2552) [Sambath Kumar Balasubramanian]

sonic-utilities:
* 2c29fde 2022-12-13 | [202205][route_check]: Ignore ASIC only SOC IPs (cherry-picking sonic-net#2548) (sonic-net#2552) (HEAD -> 202205, github/202205) [Ying Xie]
* aaa8d25 2022-12-13 | [202205][generate_dump]: Enhance show techsupport for cisco-8000 platform (sonic-net#2533) [Geert Vlaemynck]
* 25d581e 2022-12-13 | [202205][show]Fix show route return code on error (sonic-net#2547) [Sudharsan Dhamal Gopalarathnam]
* da870fc 2022-11-17 | [azure-pipelines] update azp from buster to bullseye (sonic-net#2455) [Mai Bui]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
swss:
* c9efae8 2023-01-25 | [201811][portinit] Do not call GET on SAI_PORT_ATTR_SPEED when AUTONEG is enabled (sonic-net#2484) (sonic-net#2640) (github/201811) [Ying Xie]
* ab785d8 2020-10-02 | remove FDB entires of BridgePort before removing the BridgePort (sonic-net#1451) [madhanmellanox]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
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.

2 participants