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

Convert tests test_cpu_memory_usage, test_port_toggle to support T2 c… #3117

Merged
merged 2 commits into from Mar 19, 2021

Conversation

rawal01
Copy link
Contributor

@rawal01 rawal01 commented Mar 9, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

Add new attribute modular_chassis which will be set true if DUT is modular chassis and False for other
Add support to run tests on tests/platform_tests/test_cpu_memory_usage.py, tests/platform_tests/test_port_toggle.py on T2 chassis, change test_show_chassis_module to run duts per hwsku.
Add new tests to verify thermal local and global state db on VoQ chassis introduced by PRs sonic-net/sonic-swss-common#395 and sonic-net/sonic-platform-daemons#101

How did you do it?

modifications to current tests and new test file as below:

tests/common/devices/sonic.py
Add new attribute modular_chassis which can be used to skip tests only for modular chassis if DUT is not chassis
possible values for attribute are True if DUT is part of modular chassis and False if not part of modular chassis

tests/platform_tests/cli/test_show_chassis_module.py

  • change test select one dut per hwsku instead of running on all DUTs

tests/platform_tests/test_cpu_memory_usage.py

  • change rand_one_dut_hostname to enum_rand_one_per_hwsku_hostname to test per hwsku.

tests/platform_tests/test_port_toggle.py

  • change rand_one_dut_hostname to enum_rand_one_per_hwsku_hostname to test per hwsku.

tests/platform_tests/test_thermal_state_db.py

  • Add new test for t2 chassis to verify thermal data in local state db for all thermal sensors
  • Verify global state db in supervisor has data for all sensors from all modules in chassis

How did you verify/test it?

Validated the modified tests against a chassis .

Any platform specific information?

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

Documentation

@rawal01 rawal01 requested a review from jleveque as a code owner March 9, 2021 16:41
…hassis and add new test for thermal db on T2 chassis

tests/platform_tests/cli/test_show_chassis_module.py
 - change test select one dut per hwsku instead of running on all DUTs
tests/platform_tests/test_cpu_memory_usage.py
 - change rand_one_dut_hostname to enum_rand_one_per_hwsku_hostname to test per hwsku.
tests/platform_tests/test_port_toggle.py
 - change rand_one_dut_hostname to enum_rand_one_per_hwsku_hostname to test per hwsku.
tests/platform_tests/test_thermal_state_db.py
 - Add new test for t2 chassis to verify thermal data in  local state db for all thermal sensors
 - Verify global state db in supervisor has data for all sensors from all modules in chassis
add get_modular_chassis function to set duthost fact modular_chassis true or false based on api result

modified:   tests/platform_tests/test_thermal_state_db.py
added condition to skip if dut not part of modular chassis
@jleveque jleveque requested a review from yxieca March 16, 2021 17:53
@rawal01
Copy link
Contributor Author

rawal01 commented Mar 18, 2021

@yxieca can you please review

@yxieca yxieca merged commit edbd960 into sonic-net:master Mar 19, 2021
@rawal01 rawal01 deleted the platform-t2 branch March 19, 2021 19:57
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
sonic-net#3117)

Approach
What is the motivation for this PR?
Add new attribute modular_chassis which will be set true if DUT is modular chassis and False for other
Add support to run tests on tests/platform_tests/test_cpu_memory_usage.py, tests/platform_tests/test_port_toggle.py on T2 chassis, change test_show_chassis_module to run duts per hwsku.
Add new tests to verify thermal local and global state db on VoQ chassis introduced by PRs sonic-net/sonic-swss-common#395 and sonic-net/sonic-platform-daemons#101

How did you do it?
modifications to current tests and new test file as below:

tests/common/devices/sonic.py
Add new attribute modular_chassis which can be used to skip tests only for modular chassis if DUT is not chassis
possible values for attribute are True if DUT is part of modular chassis and False if not part of modular chassis

tests/platform_tests/cli/test_show_chassis_module.py

change test select one dut per hwsku instead of running on all DUTs
tests/platform_tests/test_cpu_memory_usage.py

change rand_one_dut_hostname to enum_rand_one_per_hwsku_hostname to test per hwsku.
tests/platform_tests/test_port_toggle.py

change rand_one_dut_hostname to enum_rand_one_per_hwsku_hostname to test per hwsku.
tests/platform_tests/test_thermal_state_db.py

Add new test for t2 chassis to verify thermal data in local state db for all thermal sensors
Verify global state db in supervisor has data for all sensors from all modules in chassis
How did you verify/test it?
Validated the modified tests against a chassis .
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.

None yet

4 participants