Skip to content

Commit facca62

Browse files
docs: address validation documentation clarity issues
- Fix directory specification: clarify tests/validation/ must be current dir for pip install - Add gen_frames.sh usage details: specify directory and supported formats - Add interactive paths for test_config.yaml and topology_config.yaml - Add device specification options including system name method - Add comprehensive pytest parameter execution examples - Emphasize root user requirement more clearly throughout - Clean up duplicated device specification sections - Add clearer file location information for both config files
1 parent 49f8bb1 commit facca62

File tree

2 files changed

+53
-11
lines changed

2 files changed

+53
-11
lines changed

doc/validation_framework.md

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ A shell script for generating test frames for video testing:
4141
- Creates test patterns in various formats
4242
- Supports different resolutions and frame rates
4343
- Configurable color patterns and test signals
44+
- Generates files like `ParkJoy_1080p.yuv`, test patterns, and various resolution formats
4445

4546
**Usage**:
4647
```bash
47-
cd tests/validation/common
48-
./gen_frames.sh
48+
cd tests/validation/common # Must be in this directory
49+
./gen_frames.sh # Generates test media files for validation
50+
# Generated files will be available for test configuration
4951
```
5052

5153
**Supported Formats**:
@@ -61,10 +63,27 @@ The `configs/` directory contains YAML files that specify:
6163
- **Test Environment Settings**: Hardware specifications, media paths, and test parameters
6264
- **Network Topology**: Interface configuration, IP addressing, and routing information
6365

64-
#### [test_config.yaml](../tests/validation/configs/test_config.yaml)
66+
#### [`test_config.yaml`](../tests/validation/configs/test_config.yaml)
67+
68+
Location: `tests/validation/configs/test_config.yaml`
6569

6670
Defines the test execution environment:
6771

72+
**Key Parameters**:
73+
- **build**: Path to MTL build directory
74+
- **mtl_path**: Path to MTL installation directory
75+
- **media_path**: Path to test media files directory
76+
- **ramdisk.media.mountpoint**: Mount point for media RAM disk
77+
- **ramdisk.media.size_gib**: Size of media RAM disk in GiB
78+
- **ramdisk.pcap.mountpoint**: Mount point for packet capture RAM disk
79+
- **ramdisk.pcap.size_gib**: Size of packet capture RAM disk in GiB
80+
81+
#### [`topology_config.yaml`](../tests/validation/configs/topology_config.yaml)
82+
83+
Location: `tests/validation/configs/topology_config.yaml`
84+
85+
Defines the network topology and host configuration.
86+
6887
### MTL Engine
6988

7089
The `mtl_engine/` directory contains the core components of the framework:
@@ -187,10 +206,13 @@ hosts:
187206
```
188207
189208
**Device Specification Options**:
190-
- **PCI device ID** (recommended): Find with `lspci | grep Ethernet` → use format like "0000:18:00.0"
191-
- **System interface name**: Find with `ip link show` → use format like "enp24s0f0"
209+
You can specify network devices in multiple ways:
210+
- **PCI device ID** (recommended): `"0000:18:00.0"` (find with `lspci | grep Ethernet`)
211+
- **Interface name**: `"enp175s0f0np0"` (find with `ip link show`)
212+
- **System name**: Use your actual system hostname in the `name` field for the host
213+
- **Environment variables**: `"${TEST_PF_PORT_P}"` (if you set them)
192214

193-
**To find your options**:
215+
**To find your device options**:
194216
```bash
195217
# Find PCI device IDs
196218
lspci | grep Ethernet
@@ -249,6 +271,25 @@ sudo ./script/nicctl.sh create_vf "0000:18:00.1" # Replace with your secondary
249271

250272
### Basic Test Execution
251273

274+
**⚠️ CRITICAL**: All tests must be run as **root user**. Regular users will fail.
275+
276+
#### Run specific test with parameters:
277+
278+
**Examples of running tests with specific parameters**:
279+
```bash
280+
# Run fps test with specific parameters
281+
pytest --topology_config=configs/topology_config.yaml --test_config=configs/test_config.yaml "tests/single/st20p/fps/test_fps.py::test_fps[|fps = p60|-ParkJoy_1080p]"
282+
283+
# Run specific integrity test with resolution parameters
284+
pytest --topology_config=configs/topology_config.yaml --test_config=configs/test_config.yaml "tests/dual/st20p/integrity/test_integrity.py::test_integrity[yuv422p10le-1920x1080]"
285+
286+
# Run specific packing test
287+
pytest --topology_config=configs/topology_config.yaml --test_config=configs/test_config.yaml "tests/dual/st20p/packing/test_packing.py::test_packing[bpm-10]"
288+
289+
# Run audio format test with specific format
290+
pytest --topology_config=configs/topology_config.yaml --test_config=configs/test_config.yaml "tests/dual/st30p/st30p_format/test_st30p_format.py::test_st30p_format[pcm24]"
291+
```
292+
252293
Run all tests:
253294

254295
```bash

doc/validation_quickstart.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,18 @@ sudo ./script/nicctl.sh create_vf ${TEST_PF_PORT_R}
8080

8181
## Generate Test Media (Optional)
8282

83-
For video testing, generate test frames:
83+
For video testing, generate test frames (must run from specific directory):
8484
```bash
85-
cd tests/validation/common
86-
./gen_frames.sh
85+
cd tests/validation/common # Must be in this directory
86+
./gen_frames.sh # Generates test media files
8787
```
8888

8989
The script supports:
9090
- Multiple resolutions (3840x2160, 1920x1080, 1280x720, 640x360)
9191
- Different pixel formats (yuv422p, yuv422p10le)
92-
- Configurable color patterns and test signals
93-
- Various frame rates
92+
- Configurable color patterns and test signals with timestamps
93+
- Various frame rates and durations
94+
- Generates files like `ParkJoy_1080p.yuv` used in test examples
9495

9596
---
9697

0 commit comments

Comments
 (0)