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

[platform_tests]Fix psu test for mgmttstor #5968

Merged
merged 2 commits into from
Jul 14, 2022

Conversation

Xichen96
Copy link
Contributor

@Xichen96 Xichen96 commented Jul 12, 2022

MgmtTsToR has 4 power outlets but only 2 is visible from the DUT. The
other 2 outlets are reserved for C0 device.

Signed-off-by: Xichen Lin xichenlin@microsoft.com

Description of PR

MgmtTsToR has 4 power outlets but only 2 is visible from the DUT. The other 2 outlets are reserved for C0 device. Before the fix, tests fail because the other 2 PSUs were turned off and DUT did not observe any change. We will exclude the other 2 outlets for MgmtTsToR devices.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Same as summary.

How did you do it?

How did you verify/test it?

Run manual tests.

Any platform specific information?

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

Documentation

@@ -239,6 +239,9 @@ def test_turn_on_off_psu_and_check_psustatus(duthosts, enum_rand_one_per_hwsku_h
logging.info("Start testing turn off/on PSUs")
all_outlet_status = pdu_ctrl.get_outlet_status()
pytest_require(all_outlet_status and len(all_outlet_status) >= 2, 'Skip the test, cannot get at least 2 outlet status: {}'.format(all_outlet_status))
if tbinfo["topo"]["properties"]["configuration_properties"]["common"]["dut_type"] == "MgmtTsToR":
all_outlet_status = all_outlet_status[0:2]
logging.Info("DUT is MgmtTsToR, only the first 2 outlets are visible from DUT.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's assume last 2 outlets are belong to Console Switch (not visible from DUT)

Copy link
Contributor

@Blueve Blueve left a comment

Choose a reason for hiding this comment

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

Let's assume last 2 outlets are belong to Console Switch (not visible from DUT)

@Xichen96 Xichen96 changed the title Fix psu test for mgmttstor [platform_tests]Fix psu test for mgmttstor Jul 12, 2022
Xichen Lin added 2 commits July 12, 2022 13:04
MgmtTsToR has 4 power outlets but only 2 is visible from the DUT. The
other 2 outlets are reserved for C0 device.

Signed-off-by: Xichen Lin <xichenlin@microsoft.com>
Signed-off-by: Xichen Lin <xichenlin@microsoft.com>
@Blueve
Copy link
Contributor

Blueve commented Jul 13, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Xichen96
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Xichen96
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Blueve Blueve merged commit 8c62281 into sonic-net:master Jul 14, 2022
nhe-NV added a commit to nhe-NV/sonic-mgmt that referenced this pull request Jul 17, 2022
tbinfo is used in the PR sonic-net#5968, but the fixture is not added in the test case function.
yejianquan pushed a commit that referenced this pull request Jul 18, 2022
* Fix psu test for mgmttstor

MgmtTsToR has 4 power outlets but only 2 is visible from the DUT. The
other 2 outlets are reserved for C0 device.
Assume last 2 outlets are for C0 on MgmtTsToR

Signed-off-by: Xichen Lin <xichenlin@microsoft.com>
liat-grozovik pushed a commit that referenced this pull request Jul 18, 2022
…#5990)

tbinfo is used in the PR #5968, but the fixture is not added in the test case function.

- How did you do it?
Add the tbinfo fixture in the test_turn_on_off_psu_and_check_psustatus

- How did you verify/test it?
Run the test_turn_on_off_psu_and_check_psustatus, test pass
wangxin pushed a commit that referenced this pull request Aug 4, 2022
…#5990)

tbinfo is used in the PR #5968, but the fixture is not added in the test case function.

- How did you do it?
Add the tbinfo fixture in the test_turn_on_off_psu_and_check_psustatus

- How did you verify/test it?
Run the test_turn_on_off_psu_and_check_psustatus, test pass
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.

3 participants