Skip to content

Fix test_check_show_lpmode case#15062

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
weiguo-nvidia:fix_lpmode
Nov 6, 2024
Merged

Fix test_check_show_lpmode case#15062
bingwang-ms merged 1 commit intosonic-net:masterfrom
weiguo-nvidia:fix_lpmode

Conversation

@weiguo-nvidia
Copy link
Copy Markdown
Contributor

Description of PR

Summary: Fix test_check_show_lpmode case
Fixes # (issue)

  1. Currently the test_check_show_lpmode case use xcvr_skip_list function to check lpmode for only supported interface, but the code passes all the output of show interface transceiver lpmode to validate_transceiver_lpmode function, then the function checks each interface lpmode. This is incorrect. Fix it.

For example, if the interface lpmode is like this "['Ethernet0 N/A', 'Ethernet1 Off']", Ethernet0 is RJ45 and no lpmode check is needed. Ethernet1 needs to check lpmode

  • In the current logic, Ethernet0 does not check lpmode, which is correct.
  • Ethernet1 needs to check lpmode, but the code passes all the output (['Ethernet0 N/A', 'Ethernet1 Off']) of the command to the function validate_transceiver_lpmode. It checks each item and finds that Ethernet0 lpmode is "N/A", then the case fails. This is incorrect
  1. Move the "check if header exists" test from validate_transceiver_lpmode to test_check_show_lpmode. So the header only check one time.

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

@weiguo-nvidia weiguo-nvidia requested a review from prgeor as a code owner October 21, 2024 08:03
@bingwang-ms
Copy link
Copy Markdown
Collaborator

@prgeor Can you help review?

@prgeor
Copy link
Copy Markdown
Contributor

prgeor commented Oct 30, 2024

@mihirpat1 can review?

@prgeor prgeor requested a review from mihirpat1 October 30, 2024 21:00
@weiguo-nvidia
Copy link
Copy Markdown
Contributor Author

Hi @bingwang-ms ,

@mihirpat1 had approved the change, could you help merge it, thanks!

@bingwang-ms
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-mgmt

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms
Copy link
Copy Markdown
Collaborator

PR checker got stuck. Just re-triggered it

@mssonicbld
Copy link
Copy Markdown
Collaborator

@weiguo-nvidia PR conflicts with 202405 branch

@weiguo-nvidia
Copy link
Copy Markdown
Contributor Author

conflicts with 202405 branch

Hi @mssonicbld ,

I create PR #15417 to submit the same fix in 202405 branch, could you help review it?

veronica-arista pushed a commit to veronica-arista/sonic-mgmt that referenced this pull request Nov 7, 2024
sreejithsreekumaran pushed a commit to sreejithsreekumaran/sonic-mgmt that referenced this pull request Nov 15, 2024
yutongzhang-microsoft pushed a commit to yutongzhang-microsoft/sonic-mgmt that referenced this pull request Nov 21, 2024
wangxin pushed a commit that referenced this pull request Nov 27, 2024
Fixes # PR #15062 fix the test_check_show_lpmode case and merge in master branch, but conflicts with 202405 branch. So create this PR to submit the code to 202405 branch
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