Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_config_fec_oper_mode: Set the fec_mode to align with the current configuration of the interface. #16360

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vvolam
Copy link
Contributor

@vvolam vvolam commented Jan 6, 2025

Description of PR

As the FEC mode can be set to "none" as well, instead of setting the FEC mode to rs when testing the configuration, set the FEC mode to existing configuration of the interface.

Summary:
Fixes # (issue) #16120

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?

Verified the fix on lab testbed where the FEC mode is set to "none" and the test case is failing before the fix.

Any platform specific information?

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

Documentation

@vvolam vvolam requested a review from prgeor as a code owner January 6, 2025 22:57
@mssonicbld
Copy link
Collaborator

/azp run

@vvolam vvolam requested review from Copilot and dgsudharsan and removed request for prgeor January 6, 2025 22:57
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

tests/platform_tests/test_intf_fec.py:95

  • [nitpick] The variable name 'fec_mode' is ambiguous. It should be renamed to 'current_fec_mode' for better clarity.
fec_mode = get_fec_oper_mode(duthost, intf['interface'])

tests/platform_tests/test_intf_fec.py:97

  • The error message could be more informative by including more context about the failure.
pytest.fail("FEC status is N/A for interface {}".format(intf['interface']))
@vdahiya12
Copy link
Contributor

LGTM for the config check, maybe need to also check if interface is up before the test starts

@vvolam
Copy link
Contributor Author

vvolam commented Jan 8, 2025

LGTM for the config check, maybe need to also check if interface is up before the test starts

@vdahiya12 Thank you! Yes, this is done at line 63(53 in old) already.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam
Copy link
Contributor Author

vvolam commented Jan 8, 2025

/azp run

Copy link

Commenter does not have sufficient privileges for PR 16360 in repo sonic-net/sonic-mgmt

@vvolam
Copy link
Contributor Author

vvolam commented Jan 9, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

4 participants