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
Copy file name to clipboardExpand all lines: Runner/suites/Multimedia/Video/Video_V4L2_Runner/README_Video.md
+79-37Lines changed: 79 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,35 +14,28 @@ The suite includes a **reboot-free video stack switcher** (upstream ↔ downstre
14
14
15
15
---
16
16
17
-
## What’s New (since 2025‑09‑26)
18
-
19
-
-**Pre-download rootfs auto‑resize**
20
-
- New `ensure_rootfs_min_size` (now in `functestlib.sh`) verifies `/` has at least **2 GiB** available and, if the root partition is `/dev/disk/by-partlabel/rootfs`, runs:
21
-
```sh
22
-
resize2fs /dev/disk/by-partlabel/rootfs
23
-
```
24
-
- Invoked **before** any clip bundle download.
25
-
26
-
- **Kodiak upstream: auto‑install backup firmware before switching**
27
-
- `video_kodiak_install_firmware` (in `lib_video.sh`) looks for a recent backup blob under **`$VIDEO_FW_BACKUP_DIR`** (defaults to `/opt/video-fw-backups`) **and legacy `/opt` patterns**, then copies it to:
28
-
```
29
-
/lib/firmware/qcom/vpu/vpu20_p1_gen2.mbn
30
-
```
31
-
- Attempts **remoteproc stop → firmware swap → start**, with fallback to **module reload** and **platform unbind/bind**.
32
-
- Automatically runs when `--platform kodiak --stack upstream`.
33
-
34
-
- **Network bootstrap before downloads (Ethernet → Wi‑Fi)**
35
-
- `ensure_network_online` first tries wired DHCP;if still offline and **Wi‑Fi credentials are available**, it attempts:
36
-
1) `nmcli dev wifi connect` (with a **key‑mgmt fallback** that creates a PSK connection if NM complains: `802-11-wireless-security.key-mgmt: property is missing`), then
37
-
2) `wpa_supplicant + udhcpc` as a final fallback.
38
-
- Credentials are taken from environment **`SSID`/`PASSWORD`** or an optional `./ssid_list.txt` (first line: `ssid password`).
39
-
40
-
- **App path hardening**
41
-
- If `--app` points to a file that exists but is not executable, the runner does a best‑effort `chmod +x` and proceeds.
42
-
43
-
- **Platform‑aware hard gates & clearer logging**
44
-
- Upstream/Downstream validation is **platform specific** (lemans/monaco vs. kodiak).
45
-
- udev refresh + stale node pruning for`/dev/video*` and `/dev/media*` after any stack change.
17
+
## What’s New (since 2025‑10‑03)
18
+
19
+
-**Network stabilization delay (post-connect)**
20
+
After an interface comes up (DHCP/DNS), the runner now sleeps for a short grace period before the first TLS download to avoid immediate failures.
If the network is unreachable (or time is invalid for TLS) *and* required media clips are missing, **decode** cases are *SKIPPED* rather than failed. Encode cases continue to run.
29
+
30
+
-**App launch & inter‑test pacing**
31
+
To reduce flakiness from back‑to‑back runs, the runner adds small sleeps **before** launching `iris_v4l2_test` and **between** tests.
Module unload/load and blacklist scrubbing paths include short sleeps and a retry pass (`modprobe -r` retry with a small delay, 1s delays around remoteproc/module reloads). No new CLI needed.
36
+
37
+
-**CLI parity**
38
+
`--stack both` is supported to run the suite twice in one invocation (BASE/upstream pass then OVERLAY/downstream pass).
46
39
47
40
---
48
41
@@ -51,14 +44,33 @@ The suite includes a **reboot-free video stack switcher** (upstream ↔ downstre
51
44
- Pure **V4L2** driver-level tests using `iris_v4l2_test`
52
45
-**Encode** (YUV → H.264/H.265) and **Decode** (H.264/H.265/VP9 → YUV)
53
46
-**Yocto**-friendly, POSIX shell with BusyBox-safe paths
54
-
- Parse & run multiple JSON configs; auto-detect **encode/decode**
47
+
- Parse & run multiple JSON configs, auto-detect **encode/decode**
These are **environment variables** (not user‑visible CLI flags) so your LAVA job YAML can stay minimal. All are **optional**—defaults are sane.
62
+
63
+
| Env Var | Default | Purpose |
64
+
|---|---:|---|
65
+
|`NET_STABILIZE_SLEEP`|`5`| Sleep (seconds) after link/IP assignment before first download. Applied also when already online, to debounce DNS/routes. |
66
+
|`WGET_TIMEOUT_SECS`|`120`| BusyBox wget timeout per attempt when fetching the clip bundle. |
67
+
|`WGET_TRIES`|`2`| BusyBox wget retry count for clip bundle. |
68
+
|`VIDEO_APP_LAUNCH_SLEEP`|`1`| Sleep (seconds) right before launching `iris_v4l2_test` for each case. |
69
+
|`VIDEO_INTER_TEST_SLEEP`|`1`| Sleep (seconds) between cases to allow device/udev to settle. |
70
+
71
+
> Notes
72
+
> - If download **stalls** or the system clock is invalid for TLS, the runner re-checks network health and treats it as **offline** → decode cases **SKIP** (not FAIL).
73
+
> - Module management includes small internal waits (e.g., `modprobe -r` retry after 200ms, 1s delays around remoteproc/module reloads). These are built‑in, no extra env required.
62
74
63
75
---
64
76
@@ -123,7 +135,7 @@ cd <target_path>/Runner
123
135
|`--dry-run`| Print commands only |
124
136
|`--verbose`| Verbose runner logs |
125
137
|`--app /path/to/iris_v4l2_test`| Override test app path |
3. Runner tries **remoteproc restart**, then**module reload**, then**unbind/bind** (with short waits between steps)
187
208
188
209
### Upstream (restore a backup before switch)
189
210
When `--stack upstream` on **kodiak**, the runner tries to **restore a known‑good backup** to `/lib/firmware/qcom/vpu/vpu20_p1_gen2.mbn`**before** switching:
The runner triggers udev and prunes stale nodes; verify udev is available and rules are active.
261
303
262
304
- **Download fails**
263
-
Ensure time is sane (TLS), network is reachable, and provide Wi‑Fi creds via env or `ssid_list.txt`. The downloader uses BusyBox‑compatible flags with retries.
305
+
Ensure time is sane (TLS), network is reachable, and provide Wi‑Fi creds via env or `ssid_list.txt`. The downloader uses BusyBox‑compatible flags with retries and a final TLS‑lenient attempt if needed. When the network remains unreachable, the runner **SKIPs** decode cases.
0 commit comments