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] Implement platform phase 2 cases #980

Merged
merged 3 commits into from
Jul 21, 2019
Merged

[platform] Implement platform phase 2 cases #980

merged 3 commits into from
Jul 21, 2019

Conversation

wangxin
Copy link
Collaborator

@wangxin wangxin commented Jun 26, 2019

Description of PR

Summary:
Fixes # (issue)

Implement the SONiC platform phase 2 test cases using the pytest-ansible framework. This implementation is based on the phase 1 scripts: #915

The SONiC platform test cases are documented here:
https://github.com/Azure/SONiC/blob/master/doc/pmon/sonic_platform_test_plan.md

Test cases implemented in phase 2:

Test Case Script Common for all vendors?
Case 1.5 Sequential syncd/swss restart tests/platform/test_sequential_restart.py Yes
Case 1.6 Reload configuration tests/platform/test_reload_config.py Yes
Case 1.7 COLD/WARM/FAST reboot tests/platform/test_reboot.py Yes

Some extra helper scritps are also included in this PR. The helper scripts contain re-usable code for checking various status:

Reusable script Purpose
check_critical_services.py Check status of critical services for eg: wss, syncd, bgp, etc. Used by the test cases testing restart/reload/reboot.
check_hw_mgmt_service.py Check status of hw-management, thermal control process, fan speed, PWM setting. Used by the test cases testing restart/reload/reboot.
check_interface_status.py Check status of interfaces. Used by the test cases testing restart/reload/reboot.
check_sysfs.py Check the symbolic links under /var/run/hw-management. Used by the test case testing SYSFS.
check_transceiver_status.py Check the status of xcvrd information in DB. Used by the test case testing xcvrd and restart/reload/reboot.

Type of change

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

Approach

How did you do it?

Implement the SONiC platform phase 2 test cases using the pytest-ansible framework and follow the design of PR #802

How did you verify/test it?

Tested on the mellanox platform

Any platform specific information?

The scritps contain some platform specific checking. This pattern is used for such checking:

if sonic_asic_type in ["mellanox"]:
   do_something()
else:
   do_something_else()

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

All current test topologies are supported:
[t0, t0-16, t0-56, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

Documentation

The SONiC platform test plan:
https://github.com/Azure/SONiC/blob/master/doc/pmon/sonic_platform_test_plan.md

Implement the SONiC platform phase 2 test cases using the
pytest-ansible framework.

Signed-off-by: Xin Wang <xinw@mellanox.com>
@liat-grozovik liat-grozovik requested a review from jleveque June 30, 2019 08:39
@jleveque jleveque requested a review from lguohan July 1, 2019 20:50
* Run reboot command in background to avoid command failure caused by
  SSH connection broken before command returns
* Fine tune the reboot wait timeout values
* Add delay before checking interface status because the intfutil
  command may have no output in time

Signed-off-by: Xin Wang <xinw@mellanox.com>
@liat-grozovik liat-grozovik merged commit 6ea0101 into sonic-net:master Jul 21, 2019
@wangxin wangxin deleted the platform-phase2-pr branch March 28, 2020 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants