Skip to content

[platform] Implement platform phase 2 cases#980

Merged
liat-grozovik merged 3 commits intosonic-net:masterfrom
wangxin:platform-phase2-pr
Jul 21, 2019
Merged

[platform] Implement platform phase 2 cases#980
liat-grozovik merged 3 commits intosonic-net:masterfrom
wangxin:platform-phase2-pr

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
fraserg-arista pushed a commit to fraserg-arista/sonic-mgmt that referenced this pull request Feb 24, 2026
…ic-net#980)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should
reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [x] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement

### Approach
#### What is the motivation for this PR?
Packet trimming tests rely on simulating congestion on an egress queue.
For this, the tests are trying to apply a shaper that significantly
slows down the amount of packets sent out of the target egress queue per
second. We found that this shaper doesn't work on th5 with the current
config.

#### How did you do it?
The solution to this is to add `"meter_type" packets` when creating the
blocking scheduler (shaper).

#### How did you verify/test it?
Verified via `tcpdump` that packet transmission rate was slowed down as
expected on th5.

#### Any platform specific information?
This issue was discovered when testing on th5

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

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Intf table migration for APP_DB entries during warmboot (sonic-net#980)
[Multi NPU] Time Improvements to the config reload/load_minigraph
commands  (sonic-net#917)
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