Skip to content

[Mellanox] Update lpmode tests#8556

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
JibinBao:b_change_lpmode_tests
Jun 14, 2023
Merged

[Mellanox] Update lpmode tests#8556
liat-grozovik merged 1 commit intosonic-net:masterfrom
JibinBao:b_change_lpmode_tests

Conversation

@JibinBao
Copy link
Copy Markdown
Contributor

@JibinBao JibinBao commented Jun 9, 2023

Description of PR

Update lpmode tests

  1. Update lpmode tests due to the design change for Nvidia devices: [Mellanox] Use sysfs for sfp reset/LPM/presence sonic-buildimage#14130
    a) For Nvidia devices, before setting lpmode we need to shutdown admin ports
    b) Add one step to check when setting lpmode to enabled with admin port up, lpmode is still off and port is still up.
  2. Fix issue of test_check_sfputil_low_power_mode. Previously after setting the lpmode, test checks the value is on or off, which is not correct. we should check if the value of lpmode is the set one.
  3. Optimize test of test_check_sfputil_low_power_mode, reduce time for looking up if port supports lpmode. Previously it was needed to look up two times, currently only one time.
  4. Fix test issue for functions of links_status_down and links_status_up by stripping the space for every output

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Update lpmode tests due to desgin change for Nvidia platform

How did you do it?

Update regarding tests according to the design

How did you verify/test it?

Run tests regarding lpmode on the image including new desgin

Any platform specific information?

Any

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

Any

Documentation

@JibinBao JibinBao requested a review from prgeor as a code owner June 9, 2023 11:09
@liat-grozovik liat-grozovik changed the title [Nvidia] Update lpmode tests [Mellanox] Update lpmode tests Jun 14, 2023
@liat-grozovik liat-grozovik merged commit e01f135 into sonic-net:master Jun 14, 2023
wangxin pushed a commit that referenced this pull request Sep 28, 2023
Cherry-pick #8556 from master to 202205

1. Update lpmode tests due to the design change for Nvidia devices:
   a) For Nvidia devices, before setting lpmode we need to shutdown admin ports
   b) Add one step to check when setting lpmode to enabled with admin port up, lpmode is still off and port is still up.
2. Fix issue of test_check_sfputil_low_power_mode. Previously after setting the lpmode, test checks the value is on or off, which is not correct. we should check if the value of lpmode is the set one.
3. Optimize test of test_check_sfputil_low_power_mode, reduce time for looking up if port supports lpmode. Previously it was needed to look up two times, currently only one time.
4. Fix test issue for functions of links_status_down and links_status_up by stripping the space for every output
mrkcmo pushed a commit to Azarack/sonic-mgmt that referenced this pull request Oct 3, 2023
Update lpmode tests

1, Update lpmode tests due to the design change for Nvidia devices: [Mellanox] Use sysfs for sfp reset/LPM/presence sonic-buildimage#14130
a) For Nvidia devices, before setting lpmode we need to shutdown admin ports
b) Add one step to check when setting lpmode to enabled with admin port up, lpmode is still off and port is still up.
2. Fix issue of test_check_sfputil_low_power_mode. Previously after setting the lpmode, test checks the value is on or off, which is not correct. we should check if the value of lpmode is the set one.
3. Optimize test of test_check_sfputil_low_power_mode, reduce time for looking up if port supports lpmode. Previously it was needed to look up two times, currently only one time.
4. Fix test issue for functions of links_status_down and links_status_up by stripping the space for every output
@mssonicbld
Copy link
Copy Markdown
Collaborator

@JibinBao PR conflicts with 202305 branch

@JibinBao
Copy link
Copy Markdown
Contributor Author

will fix it. and open one new PR for 202305

JibinBao added a commit to JibinBao/sonic-mgmt that referenced this pull request Nov 30, 2023
JibinBao added a commit to JibinBao/sonic-mgmt that referenced this pull request Nov 30, 2023
yxieca pushed a commit that referenced this pull request Dec 11, 2023
…est issue (#10902)

* Revert "[Mellanox] Update lpmode tests (#8556)"

This reverts commit e01f135.
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
Update lpmode tests

1, Update lpmode tests due to the design change for Nvidia devices: [Mellanox] Use sysfs for sfp reset/LPM/presence sonic-buildimage#14130
a) For Nvidia devices, before setting lpmode we need to shutdown admin ports
b) Add one step to check when setting lpmode to enabled with admin port up, lpmode is still off and port is still up.
2. Fix issue of test_check_sfputil_low_power_mode. Previously after setting the lpmode, test checks the value is on or off, which is not correct. we should check if the value of lpmode is the set one.
3. Optimize test of test_check_sfputil_low_power_mode, reduce time for looking up if port supports lpmode. Previously it was needed to look up two times, currently only one time.
4. Fix test issue for functions of links_status_down and links_status_up by stripping the space for every output
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.

6 participants