Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions Runner/plans/video-ci-sanity.yaml

This file was deleted.

34 changes: 29 additions & 5 deletions Runner/plans/video_pre-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ run:
qcs9100-ride-r3|sa8775p-ride|iq-9075-evk|qcs9075-rb8|qcs9100-ride-sx) TL="lemans" ;;
# kodiak
qcs6490-rb3gen2|rb3gen2|qcs6490-rb3gen2-core-kit) TL="kodiak" ;;
# pakala (sm8750) - upstream only
*pakala*|*sm8750*) TL="pakala" ;;
# hamoa
hamoa|iq-x7181-evk|iq-x7181) TL="hamoa" ;;
# purwa
purwa|iq-x5121-evk|iq-x5121) TL="purwa" ;;
# fallback to autodetect in run.sh
*) TL="" ;;
esac
fi

case "$TL" in
kodiak|lemans|monaco) PLAT="--platform $TL" ;;
kodiak|lemans|monaco|pakala|shikra|talos|glymur|purwa|hamoa) PLAT="--platform $TL" ;;
*) PLAT="" ;; # autodetect
esac

Expand All @@ -72,10 +78,28 @@ run:
sh -lc "$RPATH $ARGS_BASE" || true
"$REPO_ROOT/utils/send-to-lava.sh" "$RESFILE" || true

# Run OVERLAY (downstream)
# shellcheck disable=SC2086
sh -lc "$RPATH $ARGS_OVERLAY" || true
"$REPO_ROOT/utils/send-to-lava.sh" "$RESFILE" || true
# Detect actual platform if TL is empty (auto-detect case)
if [ -z "$TL" ]; then
# Source the lib_video.sh to get platform detection
if [ -f "$REPO_ROOT/utils/lib_video.sh" ]; then
. "$REPO_ROOT/utils/lib_video.sh"
TL="$(video_detect_platform)"
echo "INFO: Auto-detected platform: $TL"
fi
fi

# Run OVERLAY (downstream) - only for platforms that support it
# pakala, shikra, talos, purwa, hamoa only support upstream/base testing
case "$TL" in
pakala|shikra|talos|purwa|hamoa)
echo "INFO: Platform $TL does not support downstream/overlay testing - skipping overlay run"
;;
*)
# shellcheck disable=SC2086
sh -lc "$RPATH $ARGS_OVERLAY" || true
"$REPO_ROOT/utils/send-to-lava.sh" "$RESFILE" || true
;;
esac

# Optional roll-up (ignored if absent)
"$REPO_ROOT/utils/result_parse.sh" || true
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ params:
LINK_TIMEOUT_S: "10"
IP_TIMEOUT_S: "15"
ETH_INTERFACE: ""
PING_TARGET: "" # Empty uses the runner default of 8.8.8.8. Set an IP to override.
PING_TARGET: ""
PING_COUNT: "4"
PING_WAIT_S: "2"
PING_RETRIES: "3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ A disconnected port is reported as an interface-level SKIP rather than a failure
- Connect the port to a link partner or switch.
- Provide IPv4 using the image network manager, DHCP configuration, or a
preconfigured static address.
- The default target `8.8.8.8` must be reachable and reply to ICMP through the
tested interface. For an isolated network, select a reachable local peer with
`--ping-target` or `PING_TARGET`. Internet access is not required with a local peer.
- Ensure the selected gateway or `PING_TARGET` is reachable through the tested
interface. Internet access is not required when a local peer is used.

## Files

Expand All @@ -48,17 +47,15 @@ Runner/utils/lib_ethernet.sh

## Configuration

CLI options override environment variables. An omitted or empty
`--ping-target` preserves `PING_TARGET` when set, otherwise it uses `8.8.8.8`.
The default gateway is not automatically selected or used as a fallback after
ping failure. Run `./run.sh --help` for the on-target option summary.
CLI options override environment variables. Run `./run.sh --help` for the
on-target option summary.

| CLI option | Environment variable | Default | Description |
|---|---|---:|---|
| `--link-timeout` | `LINK_TIMEOUT_S` | `10` | Maximum wait for carrier |
| `--ip-timeout` | `IP_TIMEOUT_S` | `15` | Maximum wait for a valid IPv4 |
| `--interface` | `ETH_INTERFACE` | automatic | Explicit interface, otherwise auto-detect |
| `--ping-target` | `PING_TARGET` | `8.8.8.8` | User-provided target overrides the public IPv4 default |
| `--ping-target` | `PING_TARGET` | automatic | Explicit target, otherwise gateway or `8.8.8.8` |
| `--ping-count` | `PING_COUNT` | `4` | Packets per ping attempt |
| `--ping-wait` | `PING_WAIT_S` | `2` | Per-packet ping timeout |
| `--ping-retries` | `PING_RETRIES` | `3` | Ping attempts |
Expand All @@ -70,25 +67,12 @@ cd Runner/suites/Connectivity/Ethernet/Ethernet_Basic_Validation
./run.sh
```

The default command pings `8.8.8.8` through each tested interface. All retries
use the same selected target. To select a local peer explicitly:
Example:

```sh
./run.sh --ping-target 192.168.1.1 --link-timeout 20
```

The environment equivalent and CLI precedence are:

```sh
PING_TARGET=192.168.1.1 ./run.sh
PING_TARGET=192.168.1.1 ./run.sh --ping-target 192.168.1.2
```

For LAVA, set the existing `PING_TARGET` parameter to the desired IP. Its empty
default selects `8.8.8.8`. Unreachable targets fail the connectivity check after
the configured retries, even when carrier and IPv4 checks pass. Disconnected
ports and interfaces without valid IPv4 retain their existing SKIP behavior.

To test one explicit interface, use either form:

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,25 @@ RESULT_TABLE="./$TESTNAME.results.tsv"
LINK_TIMEOUT_S="${LINK_TIMEOUT_S:-10}"
IP_TIMEOUT_S="${IP_TIMEOUT_S:-15}"
ETH_INTERFACE="${ETH_INTERFACE:-}"
PING_TARGET="${PING_TARGET:-8.8.8.8}"
PING_TARGET="${PING_TARGET:-}"
PING_COUNT="${PING_COUNT:-4}"
PING_WAIT_S="${PING_WAIT_S:-2}"
PING_RETRIES="${PING_RETRIES:-3}"

# usage
# Print supported options and the ping-target default to stdout. Returns 0.
usage() {
printf '%s\n' \
"Usage: ./run.sh [options]" \
" --link-timeout SECONDS" \
" --ip-timeout SECONDS" \
" --interface IFACE" \
" --ping-target ADDRESS (default: PING_TARGET or 8.8.8.8)" \
" --ping-target ADDRESS" \
" --ping-count COUNT" \
" --ping-wait SECONDS" \
" --ping-retries COUNT" \
" -h, --help" \
"CLI options override environment variables."
}

# parse_args [OPTIONS...]
# Apply CLI overrides to suite settings. Empty ping-target values preserve the
# environment/default target. No stdout except help, exits 2 on invalid options.
parse_args() {
while [ "$#" -gt 0 ]; do
case "$1" in
Expand Down Expand Up @@ -121,9 +116,7 @@ parse_args() {
usage
exit 2
}
if [ -n "$2" ]; then
PING_TARGET="$2"
fi
PING_TARGET="$2"
shift 2
;;
--ping-count)
Expand Down Expand Up @@ -171,7 +164,7 @@ rm -f "$RES_FILE" "$SUMMARY_FILE" "$RESULT_TABLE"

log_info "--------------------------------------------------------------------------"
log_info "------------------- Starting $TESTNAME Testcase --------------------------"
log_info "Configuration: interface=${ETH_INTERFACE:-auto} LINK_TIMEOUT_S=$LINK_TIMEOUT_S IP_TIMEOUT_S=$IP_TIMEOUT_S PING_TARGET=$PING_TARGET PING_COUNT=$PING_COUNT PING_WAIT_S=$PING_WAIT_S PING_RETRIES=$PING_RETRIES"
log_info "Configuration: interface=${ETH_INTERFACE:-auto} LINK_TIMEOUT_S=$LINK_TIMEOUT_S IP_TIMEOUT_S=$IP_TIMEOUT_S PING_TARGET=${PING_TARGET:-auto} PING_COUNT=$PING_COUNT PING_WAIT_S=$PING_WAIT_S PING_RETRIES=$PING_RETRIES"

if ! CHECK_DEPS_NO_EXIT=1 check_dependencies \
ip \
Expand Down
66 changes: 14 additions & 52 deletions Runner/suites/Multimedia/Audio/AudioLoopback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,11 @@
media. It generates a deterministic 48 kHz, unsigned 8-bit stereo WAV, starts
capture, plays the reference, and validates the resulting WAV.

Automatic selection uses an active PipeWire or PulseAudio session and discovers
playback and capture independently. Playback tries speakers and then headphones.
Capture tries mic and then headset-mic. PipeWire requires `wpctl`, `pw-record`,
and `pw-play` or `pw-cat`.
PulseAudio requires `pactl`, `parecord`, and `paplay`.
Playback aliases `speaker`/`speakers` and
`headphone`/`headphones`/`headset` map to the same canonical routes. Capture
aliases `mic`/`microphone` and
`headset-mic`/`headset_mic`/quoted `headset mic` are normalized before runtime
route discovery. The effective selections and targets are emitted to standard
output in an `AUDIO_ROUTE` record.
Automatic selection uses an active PipeWire or PulseAudio session and its
physical speaker and microphone routes. PipeWire requires `wpctl`, `pw-record`,
and `pw-play` or `pw-cat`. PulseAudio requires `pactl`, `parecord`, and `paplay`.
If no managed backend is usable, the suite falls back to image-provided `aplay`
and `arecord`. Direct ALSA mode retrieves `PlaybackPCM` and `CapturePCM` from
the matching UCM HiFi devices instead of encoding card or PCM numbers. It
enables both devices in one UCM session when they share a card and verifies
both through `_enadevs`. Private `_ucmNNNN.` prefixes are removed only from
standard `hw:` or `plughw:` PCM names. UCM-only private virtual names are not
used as standalone direct PCM routes. Auto-discovered raw `hw:` playback PCMs
use the corresponding `plughw:` target so ALSA can convert the generated U8
reference to the hardware PCM capabilities. Capture keeps its probed hardware
format and device. Legacy speaker/microphone discovery
remains available for images without usable UCM routes. The suite never
installs runtime packages.
and `arecord`. The suite never installs runtime packages.

On Debian and CentOS, a root invocation prepares the regular desktop audio user
and re-launches the complete test as that user. Automatic selection also
Expand All @@ -38,9 +20,9 @@ execution behavior.

The selected output must reach the selected input through an acoustic or
electrical fixture. Automatic selection prefers the active managed backend and
its requested physical endpoints. Supplying either device option selects direct
ALSA mode, where the unspecified side is discovered. Explicit ALSA devices are
recommended for fixtures that require fixed PCM endpoints:
its physical speaker and microphone endpoints. Supplying either device option
selects direct ALSA mode, where the unspecified side is discovered. Explicit
ALSA devices are recommended for fixtures that require fixed PCM endpoints:

```sh
./run.sh \
Expand All @@ -49,19 +31,10 @@ recommended for fixtures that require fixed PCM endpoints:
--duration 5
```

Route-only examples use runtime endpoint and UCM discovery:

```sh
./run.sh --sink speakers --source mic --duration 5
./run.sh --sink headphones --source headset-mic --duration 5
```

An explicit semantic route or PCM device is used only after runtime discovery
and an open probe succeed. Explicit unavailable or malformed choices report
FAIL with the requested route/device and retained probe evidence. Automatic
discovery with no applicable route pair reports SKIP. A ready backend with
missing required clients, a broken applicable route, or an all-zero capture
reports FAIL.
When no backend or device inventory exists, the suite reports SKIP with the
missing prerequisite. When a managed backend is active but its physical routes
are unusable and direct ALSA fallback also fails, the suite reports FAIL so the
image or routing regression remains visible. An all-zero capture reports FAIL.
The default policy does not claim waveform correlation when the input contains
some other non-zero signal, so retained metrics and the fixture setup remain
important evidence.
Expand All @@ -73,28 +46,17 @@ WAV integrity: corrupt or empty files, header-only payloads, all-zero audio, and
materially short captures fail. RMS, peak, clipping, digital-silence runs, DC
offset, large sample transitions, and silent-channel counts are emitted in
`AUDIO_VALIDATION` records as diagnostic metrics. They do not fail the default
policy. The generated two-level square-wave reference is validated with its
known signal shape, so it does not produce a near-constant diagnostic. Complete
RIFF chunks after a WAV `data` chunk are reported as metadata rather than as
trailing audio.
policy.

## Options

- `--duration SECONDS` selects 2 to 30 seconds.
- `--sink auto|speaker|speakers|headphone|headphones|headset` selects playback.
- `--source auto|mic|microphone|headset-mic|headset_mic|"headset mic"` selects
capture.
- `--playback-device DEVICE|auto` overrides playback discovery. `auto` and an
empty LAVA parameter retain discovery.
- `--capture-device DEVICE|auto` overrides capture discovery and probes a supported
- `--playback-device DEVICE` overrides playback discovery.
- `--capture-device DEVICE` overrides capture discovery and probes a supported
format on that exact device.
- `--dmesg-scan 0|1` controls retained kernel-log evidence.
- `--no-dmesg` disables the kernel-log scan.

An explicit `--playback-device` value is used exactly as supplied. Use
`plughw:CARD,DEVICE` when the fixture's hardware PCM does not natively accept
the generated U8 stereo reference.

Artifacts are retained below `results/AudioLoopback/run-<timestamp>-<pid>/`.

## Yocto CI
Expand Down
Loading
Loading