You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add interactive paths and clear directory requirements for all commands
- Create validation_quickstart.md for rapid setup with step-by-step guide
- Enhance validation_framework.md with root user requirements and device options
- Add gen_frames.sh usage documentation with supported formats
- Include specific test parameter examples and VF creation instructions
- Update tests/validation/README.md with clickable config file links
- Add comprehensive troubleshooting and multiple device specification methods
- Improve documentation hierarchy following repository standards
Addresses developer feedback for clearer setup instructions and eliminates
common configuration issues that block new developers.
Copy file name to clipboardExpand all lines: doc/validation_framework.md
+85-9Lines changed: 85 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
The Media Transport Library (MTL) Validation Framework provides comprehensive testing capabilities for various aspects of the MTL, including protocol compliance, performance, and integration testing.
4
4
5
+
> **🚀 Quick Start**: For rapid setup, see [Validation Quick Start Guide](validation_quickstart.md)
6
+
5
7
## Overview
6
8
7
9
The validation framework uses pytest to organize and execute tests across various scenarios, protocols, and backend implementations. It supports both automated testing in CI/CD environments and manual testing for development and troubleshooting.
@@ -32,13 +34,37 @@ The `common/` directory contains shared utilities that provide fundamental funct
32
34
-**Integrity Tools**: Provides functions for data integrity verification between source and received media
33
35
-**Network Interface Control**: Manages network interfaces required for testing
34
36
37
+
#### gen_frames.sh
38
+
39
+
A shell script for generating test frames for video testing:
The `mtl_engine/` directory contains the core components of the framework:
@@ -106,20 +132,26 @@ For complete build instructions, see [doc/build.md](build.md).
106
132
107
133
### Environment Setup
108
134
109
-
1. Create and activate a virtual environment:
135
+
> **⚠️ IMPORTANT**: Run all commands in the `tests/validation/` directory
136
+
137
+
1. Create and activate a Python virtual environment:
110
138
111
139
```bash
112
-
cd tests/validation
140
+
cd tests/validation# Must be in this directory!
113
141
python3 -m venv venv
114
142
source venv/bin/activate
115
143
```
116
144
117
145
**Note**: If you're using VS Code or other development tools that auto-configure Python environments, ensure you're using the correct Python interpreter. The tests require the packages from `tests/validation/requirements.txt`.
118
146
119
-
2. Install dependencies:
147
+
2. Install required dependencies:
120
148
121
149
```bash
150
+
# Main framework requirements (run in tests/validation/)
122
151
pip install -r requirements.txt
152
+
153
+
# Additional integrity test components (optional but recommended)
154
+
pip install -r common/integrity/requirements.txt
123
155
```
124
156
125
157
Verify installation:
@@ -131,7 +163,7 @@ python -m pytest --version
131
163
132
164
#### Critical Configuration Steps
133
165
134
-
1.**Update `configs/topology_config.yaml`** with your actual network interface details:
166
+
1.**Update [`configs/topology_config.yaml`](../tests/validation/configs/topology_config.yaml)** with your actual network interface details:
135
167
136
168
```yaml
137
169
---
@@ -149,14 +181,25 @@ hosts:
149
181
connection_type: SSHConnection
150
182
connection_options:
151
183
port: 22
152
-
username: root #Update with your username
184
+
username: root #⚠️ MUST be root for MTL validation
153
185
password: None # Use key-based auth when possible
154
-
key_path: /home/user/.ssh/id_rsa # Update path to your SSH key
186
+
key_path: /root/.ssh/id_rsa # Update path to your SSH key
155
187
```
156
188
157
-
**To find your PCI device ID**: `lspci | grep Ethernet`
189
+
**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"
192
+
193
+
**To find your options**:
194
+
```bash
195
+
# Find PCI device IDs
196
+
lspci | grep Ethernet
197
+
198
+
# Find system interface names
199
+
ip link show
200
+
```
158
201
159
-
2. **Update `configs/test_config.yaml`** with your environment paths:
202
+
2. **Update [`configs/test_config.yaml`](../tests/validation/configs/test_config.yaml)** with your environment paths:
160
203
161
204
```yaml
162
205
build: /path/to/Media-Transport-Library/ # Update to your MTL root directory
@@ -182,14 +225,35 @@ ramdisk:
182
225
- Set `media_path` to where your test media files are located
183
226
- Ensure the paths exist and are accessible
184
227
228
+
#### Optional: Create VFs for Advanced Testing
229
+
230
+
For NIC testing with Virtual Functions:
231
+
232
+
```bash
233
+
# First, identify your network devices
234
+
lspci | grep Ethernet
235
+
236
+
# Create VFs (replace with your actual PCI device IDs or interface names)
237
+
sudo ./script/nicctl.sh create_vf "0000:18:00.0" # Replace with your primary port
238
+
sudo ./script/nicctl.sh create_vf "0000:18:00.1" # Replace with your secondary port
239
+
```
240
+
241
+
**Examples of valid identifiers**:
242
+
- PCI device ID: `"0000:18:00.0"`
243
+
- Interface name: `"enp24s0f0"`
244
+
- Environment variables: `"${TEST_PF_PORT_P}"`(if you set them)
245
+
185
246
## Running Tests
186
247
187
-
### Basic Usage
248
+
> **⚠️ CRITICAL**: Tests must be run as **root user**, not regular user. MTL validation framework requires root privileges for network operations.
This quick start guide helps you get the MTL validation framework running with minimal setup. For detailed information, see the [complete validation framework documentation](validation_framework.md).
4
+
5
+
## Prerequisites (Must Complete First!)
6
+
7
+
1.**🏗️ Build MTL** (CRITICAL - tests will fail without this):
8
+
```bash
9
+
cd /path/to/Media-Transport-Library
10
+
./build.sh
11
+
```
12
+
> If this fails, see [detailed build instructions](build.md)
13
+
14
+
2.**📋 Basic Requirements**:
15
+
- Python 3.9+
16
+
- Root user access (MTL validation requires root privileges)
17
+
- Network interfaces configured for testing
18
+
19
+
## Quick Setup (3 steps)
20
+
21
+
### 1. Install Dependencies
22
+
**Run in tests/validation directory**:
23
+
```bash
24
+
cd tests/validation
25
+
python3 -m venv venv
26
+
source venv/bin/activate
27
+
pip install -r requirements.txt # Main framework requirements
28
+
pip install -r common/integrity/requirements.txt # Integrity test components
Copy file name to clipboardExpand all lines: tests/validation/README.md
+16-9Lines changed: 16 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,19 @@
2
2
3
3
The Media Transport Library (MTL) Validation Framework provides comprehensive testing capabilities for various aspects of the MTL, including protocol compliance, performance, and integration testing.
4
4
5
-
> **For detailed documentation, please refer to [the main validation framework documentation](/doc/validation_framework.md)**
5
+
> **📖 For detailed documentation, please refer to [the main validation framework documentation](../../doc/validation_framework.md)**
6
+
>
7
+
> **🚀 Quick Start**: See [Validation Quick Start Guide](../../doc/validation_quickstart.md)
6
8
7
-
## Quick Start Guide
9
+
## Quick Setup
8
10
9
11
### Prerequisites
10
12
11
13
- Python 3.9 or higher
12
14
-**⚠️ CRITICAL**: Media Transport Library built and installed (see [build instructions](../../doc/build.md))
13
15
- Test media files (typically on NFS)
14
16
- Network interfaces configured for testing
15
-
- Root privileges for network operations
17
+
-**Root privileges required** (MTL validation must run as root user)
16
18
- FFmpeg and GStreamer plugins (for integration tests)
17
19
18
20
### Setup in 3 Simple Steps
@@ -24,27 +26,32 @@ The Media Transport Library (MTL) Validation Framework provides comprehensive te
24
26
```
25
27
See [detailed build instructions](../../doc/build.md) if needed.
26
28
27
-
2.**Create a virtual environment and install dependencies**:
29
+
2.**Create virtual environment and install dependencies** (run in `tests/validation/`):
28
30
```bash
29
-
cd tests/validation
31
+
cd tests/validation# Must be in this directory!
30
32
python3 -m venv venv
31
33
source venv/bin/activate
32
-
pip install -r requirements.txt
34
+
pip install -r requirements.txt # Main framework requirements
35
+
pip install -r common/integrity/requirements.txt # Integrity test components
33
36
```
34
37
35
38
3.**Configure your environment**:
36
-
- Update network interfaces in `configs/topology_config.yaml`
37
-
- Set correct paths in `configs/test_config.yaml` (especially `build` and `mtl_path`)
39
+
- Update network interfaces in [`configs/topology_config.yaml`](configs/topology_config.yaml)
40
+
- Set correct paths in [`configs/test_config.yaml`](configs/test_config.yaml) (especially `build` and `mtl_path`)
38
41
- Ensure media files are accessible at `media_path`
42
+
-**Use root user** in topology_config.yaml (not regular user)
39
43
40
44
4.**Run tests**:
41
45
```bash
42
-
# Run smoke tests (quick validation)
46
+
# Run smoke tests (quick validation) - MUST be run as root
0 commit comments