@@ -16,12 +16,17 @@ sonic-mgmt/
1616│ ├── vlan/ # VLAN tests
1717│ ├── ecmp/ # ECMP tests
1818│ ├── crm/ # CRM tests
19+ │ ├── smartswitch/ # SmartSwitch / DPU tests
20+ │ │ ├── common/ # Shared DPU utilities (device_utils_dpu.py, reboot.py)
21+ │ │ ├── conftest.py # SmartSwitch fixtures (gNOI certs, ptf_gnoi)
22+ │ │ └── platform_tests/ # DPU platform tests (reboot, health, temperature)
1923│ ├── conftest.py # Shared pytest fixtures
2024│ └── ... # Many more test modules
2125├── ansible/ # Ansible playbooks for testbed management
2226│ ├── roles/ # Ansible roles
2327│ ├── vars/ # Variable files
2428│ ├── testbed.yaml # Testbed topology definitions
29+ │ ├── golden_config_db/ # Golden config DB JSON files applied to DUTs
2530│ └── ...
2631├── spytest/ # SPyTest framework (alternative test framework)
2732├── sdn_tests/ # SDN-specific tests
@@ -32,12 +37,22 @@ sonic-mgmt/
3237```
3338
3439### Key Concepts
35- - ** Testbed topologies** : Tests run on defined topologies (t0, t1, t2, dualtor, etc.)
40+ - ** Testbed topologies** : Tests run on defined topologies (t0, t1, t2, dualtor, smartswitch, etc.)
3641- ** DUT (Device Under Test)** : The SONiC switch being tested
3742- ** PTF (Packet Test Framework)** : Used for data-plane testing via packet injection
3843- ** Ansible** : Used to deploy and manage testbed infrastructure
3944- ** Fixtures** : Pytest fixtures provide testbed access, DUT connections, and topology info
4045
46+ ### SmartSwitch / DPU Concepts
47+ - ** SmartSwitch** : A SONiC switch with one or more on-board DPU (Data Processing Unit) modules
48+ - ** DPU (Data Processing Unit)** : An independent SONiC instance running on a SmartSwitch module; accessed via midplane IP
49+ - ** NPU** : The main switch CPU on a SmartSwitch (runs SONiC, manages DPUs via ` config chassis modules ` )
50+ - ** Midplane** : Internal network connecting NPU to DPUs; DPUs are reachable via midplane IP addresses
51+ - ** Dark mode** : All DPUs are administratively shut down (` CHASSIS_MODULE ` admin-status = down)
52+ - ** Lit mode** : DPUs are administratively up and running; tests can interact with them via midplane IPs using SSH port forwarding
53+ - ** ` duthost ` ** : Handle to the NPU (switch); ** ` dpuhosts ` ** : list of handles to individual DPU SONiC instances
54+
55+
4156## Language & Style
4257
4358- ** Primary language** : Python 3
@@ -100,13 +115,13 @@ from tests.common.helpers.assertions import pytest_assert
100115def test_my_feature (duthosts , rand_one_dut_hostname , tbinfo ):
101116 """ Test that my feature works correctly."""
102117 duthost = duthosts[rand_one_dut_hostname]
103-
118+
104119 # Configure via CLI
105120 duthost.shell(' config my_feature enable' )
106-
121+
107122 # Verify state
108123 output = duthost.show_and_parse(' show my_feature status' )
109- pytest_assert(output[0 ][' status' ] == ' enabled' ,
124+ pytest_assert(output[0 ][' status' ] == ' enabled' ,
110125 " Feature should be enabled" )
111126```
112127
@@ -120,6 +135,47 @@ def test_my_feature(duthosts, rand_one_dut_hostname, tbinfo):
120135- ** Idempotency** : Tests should be idempotent — clean up after themselves
121136- ** No hardcoded values** : Use fixtures and testbed info instead of hardcoded IPs/ports
122137
138+ ### PR Description Template
139+
140+ When creating a PR, always use ` .github/PULL_REQUEST_TEMPLATE.md ` as the body. Fill in every section; do not omit or reorder them:
141+
142+ ```
143+ ### Description of PR
144+ Summary:
145+ Fixes # (issue)
146+
147+ ### Type of change
148+ - [ ] Bug fix
149+ - [ ] Testbed and Framework(new/improvement)
150+ - [ ] New Test case
151+ - [ ] Skipped for non-supported platforms
152+ - [ ] Test case improvement
153+
154+ ### Back port request
155+ - [ ] 202205
156+ - [ ] 202305
157+ - [ ] 202311
158+ - [ ] 202405
159+ - [ ] 202411
160+ - [ ] 202505
161+ - [ ] 202511
162+
163+ ### Approach
164+ #### What is the motivation for this PR?
165+
166+ #### How did you do it?
167+
168+ #### How did you verify/test it?
169+
170+ #### Any platform specific information?
171+
172+ #### Supported testbed topology if it's a new test case?
173+
174+ ### Documentation
175+ ```
176+
177+ Mark the appropriate ` [ ] ` checkbox(es) with ` [x] ` based on the change type and target branches.
178+
123179## Common Patterns
124180
125181### DUT Host Operations
0 commit comments