From a6c041a657c519c5e14830c1bcc830f06b840597 Mon Sep 17 00:00:00 2001 From: Srikanth Muppandam Date: Wed, 30 Sep 2026 22:07:05 +0530 Subject: [PATCH 1/2] fastrpc: validate client support for runtime domains Detect version-varying client capability from retained invocation output instead of distro or package-version gates. Fail runtime-ready domains that the installed test payload cannot exercise, while keeping all test dependencies image-provided. Signed-off-by: Srikanth Muppandam --- .../CDSP/fastrpc_test/fastrpc_test_README.md | 29 ++++++++--- .../Multimedia/CDSP/fastrpc_test/run.sh | 22 +++++++- Runner/utils/lib_fastrpc.sh | 51 +++++++++++++++++-- 3 files changed, 91 insertions(+), 11 deletions(-) diff --git a/Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test_README.md b/Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test_README.md index e9972ec7..6045868f 100644 --- a/Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test_README.md +++ b/Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test_README.md @@ -16,6 +16,9 @@ Supported capabilities: character endpoints. The fallback cannot discover PD support directly, so it uses the documented conservative protocol map. The fallback recognizes both `sdsp` and the public `slpi` remoteproc identity for the sensor DSP. Host, test, and DSP skeleton libraries remain runtime-discovered. + The functional invocation is the final capability proof. If an older or vendor-specific test + payload cannot represent a runtime-ready domain, that invocation is reported as FAIL without + relying on package-version or distribution checks. - Multiple iterations with a required finite timeout. - Precise control over binary location via `--bin-dir`. - Line-buffered output through `stdbuf` when available. @@ -26,7 +29,7 @@ Supported capabilities: - CI-ready logs with timestamps and per-iteration, per-domain/PD results - Parameterized control (`--arch`, `--repeat`, `--timeout`, `--bin-dir`, `--domain-mode`, `--domain`, `--domain-name`, `--pd-mode`, `--unsigned-pd`, `--verbose`) -- Auto-discovery of system libraries and DSP skeletons for both Yocto and Debian layouts +- Auto-discovery of system libraries and DSP skeletons for Yocto, Debian, Ubuntu, and RPM layouts - Runtime domain and PD discovery without SoC-name filtering ## Prerequisites @@ -40,16 +43,18 @@ Have these on the target (or specify paths with the flags below): is absent. - FastRPC system libraries and DSP skeletons auto-discovered from standard locations: - Yocto: `/usr/local/lib`, `/usr/local/lib/fastrpc_test`, `/usr/local/share/fastrpc_test` - - Debian: `/usr/lib/`, `/usr/lib//fastrpc_test`, `/usr/share/fastrpc_test` - - RPM-based images: `/usr/lib64`, `/usr/lib64/fastrpc_test`, `/usr/share/fastrpc_test` + - Debian/Ubuntu: `/usr/lib/`, `/usr/lib//fastrpc_test`, `/usr/share/fastrpc_test` + - CentOS and other RPM-based images: `/usr/lib64`, `/usr/lib64/fastrpc_test`, `/usr/share/fastrpc_test` - A selected DSP skeleton directory must contain the complete calculator, HAP example, and multithreading skeleton set. Discovered directories are prepended to the semicolon-separated `DSP_LIBRARY_PATH` used by the public `fastrpc_test` utility while preserving existing DSP search entries. The same merged value is exported through the domain-specific library paths. - Optional but recommended: - `stdbuf` for line-buffered output. Execution remains bounded without it. -- The suite does not install packages at runtime. Missing optional image assets are reported as - SKIP unless the operator explicitly selected a domain whose required runtime library is absent. +- The suite does not install packages at runtime on Yocto, Debian, Ubuntu, CentOS, or other + distributions. Provision `fastrpc_test`, its host libraries, and DSP skeletons in the image. +- Missing optional image assets are reported as SKIP unless the operator explicitly selected a + domain whose required runtime library is absent. ## Directory Structure @@ -141,7 +146,10 @@ An explicitly selected domain fails when it is unavailable, lacks its runtime li support the requested PD mode. Automatic selection from the runtime fallback excludes domains without complete remoteproc and endpoint evidence. When `fastrpc-healthcheck` reports an online, FastRPC-supported domain, a missing endpoint or required runtime library is treated as a broken -installation and fails the suite. +installation and fails the suite. The runner does not infer client capability from a distro name or +package version. When runtime fallback discovers a domain but the installed `fastrpc_test` payload +reports that it cannot represent that domain, the invocation is classified as FAIL so the image or +package gap remains visible until a matching payload is provisioned. Other domains still execute. ### LAVA integration example @@ -186,6 +194,10 @@ installation and fails the suite. domains continue. - **Unsupported automatic domain**: Logged with the healthcheck reason and excluded. Other runnable domains continue. +- **Test payload lacks a runtime-ready domain**: A retained invocation log proving that the + installed client cannot represent the selected numeric domain is classified as FAIL. This is + feature probing, not a package-version check, so it behaves the same on Yocto, Debian, Ubuntu, + and CentOS and automatically starts passing when a capable package is provisioned. - **Offline explicitly requested domain**: Fails with the healthcheck or remoteproc state. - **Missing runtime artifacts**: When the capability source is `fastrpc-healthcheck`, a domain missing its endpoint or required runtime library fails the suite — healthcheck has declared it @@ -194,6 +206,8 @@ installation and fails the suite. Missing shared test libraries or DSP skeletons skip the suite before execution. - **Binary resolved to /bin/fastrpc_test**: Blocked by default. Set `ALLOW_BIN_FASTRPC=1` or use `--bin-dir` to a non-`/bin` path. +- **Missing binary on any distribution**: Package installation is not attempted. The suite reports + SKIP with the expected image-provided binary path. - **Session create errors with -U 1**: If unsigned PD returns `0x80000416`, confirm your image includes unsigned shells/policies (or use `--pd-mode signed-only`). - **Domain not discovered**: Check `dmesg` for remoteproc firmware load errors. The test @@ -208,7 +222,8 @@ installation and fails the suite. - Domain and PD support are derived from `fastrpc-healthcheck` when available. The fallback is selected only when the tool is absent and uses runtime remoteproc and endpoint evidence, with - a conservative protocol mapping for PD support. + a conservative protocol mapping for PD support. Actual invocation output then provides the + distro-independent functional proof that the installed client supports the selected domain. - The existing `/usr/lib/dsp` compatibility links are prepared before healthcheck captures its capability report, so the report and the subsequent functional run observe the same layout. - This suite runs the public `fastrpc_test` character-device path and therefore requires either diff --git a/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh b/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh index 16596f8f..d668ebce 100755 --- a/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh +++ b/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh @@ -322,7 +322,7 @@ RUN_DIR="$BIN_DIR" RUN_BIN="$RUN_DIR/fastrpc_test" if [ ! -x "$RUN_BIN" ]; then - test_result_finish "SKIP" "$TESTNAME SKIP - fastrpc_test not installed (expected at: $RUN_BIN)" + test_result_finish "SKIP" "$TESTNAME SKIP - image-provided fastrpc_test is unavailable, expected=$RUN_BIN" fi # -------------------- Logging root ----------------------------- @@ -605,6 +605,26 @@ for DOMAIN in $DOMAINS_TO_TEST; do echo "----- $iter_tag output end -----" fi + domain_unsupported_reason="" + if [ -r "$iter_log" ]; then + domain_unsupported_reason="$( + fastrpc_invocation_domain_unsupported_reason \ + "$iter_log" \ + "$DOMAIN" || true + )" + fi + + if [ -n "$domain_unsupported_reason" ]; then + test_result_record "FAIL" "$iter_tag: runtime domain=$dom_name id=$DOMAIN is unsupported by installed fastrpc_test, reason=$domain_unsupported_reason capability_source=$CAPABILITY_SOURCE selection=$SELECTION_SOURCE required=image-package-with-matching-domain-support" + combo_fail=$((combo_fail + 1)) + combo_subtests_total=$((combo_subtests_total + 1)) + combo_subtests_fail=$((combo_subtests_fail + 1)) + RUNTIME_FAILURE_SEEN=1 + + i=$((i + 1)) + continue + fi + if [ "$rc" -ne 0 ]; then log_fail "$iter_tag: fastrpc_test exited $rc" RUNTIME_FAILURE_SEEN=1 diff --git a/Runner/utils/lib_fastrpc.sh b/Runner/utils/lib_fastrpc.sh index 85f27a6c..fe952939 100755 --- a/Runner/utils/lib_fastrpc.sh +++ b/Runner/utils/lib_fastrpc.sh @@ -4,18 +4,23 @@ # FastRPC runtime layout helpers. # -# Supports both Yocto/current and Debian package layouts. +# Supports Yocto, Debian, Ubuntu, and RPM-based package layouts. # # Yocto/current: # libs : /usr/local/lib # test libs : /usr/local/lib/fastrpc_test # skeletons : dynamically discovered below /usr/local/share/fastrpc_test # -# Debian: +# Debian/Ubuntu: # libs : /usr/lib/ # test libs : /usr/lib//fastrpc_test # skeletons : dynamically discovered below /usr/share/fastrpc_test # +# RPM-based: +# libs : /usr/lib64 +# test libs : /usr/lib64/fastrpc_test +# skeletons : dynamically discovered below /usr/share/fastrpc_test +# # Optional environment overrides: # FASTRPC_LIB_SYS_DIR # FASTRPC_LIB_TEST_DIR @@ -312,7 +317,7 @@ fastrpc_discover_runtime_layout() { FASTRPC_LIB_TEST_DIRS_CHECKED="$(fastrpc_append_word_unique "$FASTRPC_LIB_TEST_DIRS_CHECKED" "/usr/local/lib64/fastrpc_test")" FASTRPC_SKEL_BASES_CHECKED="$(fastrpc_append_word_unique "$FASTRPC_SKEL_BASES_CHECKED" "/usr/local/share/fastrpc_test")" - # Debian/multiarch layout. + # Debian/Ubuntu multiarch layout. if [ -n "$FASTRPC_MULTIARCH_TRIPLET" ]; then FASTRPC_LIB_SYS_DIRS_CHECKED="$(fastrpc_append_word_unique "$FASTRPC_LIB_SYS_DIRS_CHECKED" "/usr/lib/$FASTRPC_MULTIARCH_TRIPLET")" FASTRPC_LIB_TEST_DIRS_CHECKED="$(fastrpc_append_word_unique "$FASTRPC_LIB_TEST_DIRS_CHECKED" "/usr/lib/$FASTRPC_MULTIARCH_TRIPLET/fastrpc_test")" @@ -661,6 +666,46 @@ extract_test_summary_counts() { printf '%s:%s:%s:%s\n' "$total" "$passed" "$failed" "$skipped" } +# fastrpc_invocation_domain_unsupported_reason LOG_FILE DOMAIN_ID +# Detect output proving that the installed test payload cannot represent a selected FastRPC domain. +# Inputs: retained invocation log and numeric domain ID. Output: a stable reason token on stdout. +# Returns: 0 when client-side domain support is absent, 1 otherwise. Side effects: none. +fastrpc_invocation_domain_unsupported_reason() { + invocation_log="$1" + invocation_domain="$2" + + [ -r "$invocation_log" ] || return 1 + + case "$invocation_domain" in + ''|*[!0-9]*) + return 1 + ;; + esac + + if grep -Eiq \ + "unable to get domain struct[[:space:]]+$invocation_domain([^[:digit:]]|$)" \ + "$invocation_log"; then + printf '%s\n' "test-client-domain-table-missing" + return 0 + fi + + if grep -Eiq \ + "domain([[:space:]]+id)?[[:space:]:=]+$invocation_domain([^[:digit:]]|$).*(unsupported|not supported|invalid)" \ + "$invocation_log"; then + printf '%s\n' "test-client-domain-unsupported" + return 0 + fi + + if grep -Eiq \ + "(unsupported|not supported|invalid).*domain([[:space:]]+id)?[[:space:]:=]+$invocation_domain([^[:digit:]]|$)" \ + "$invocation_log"; then + printf '%s\n' "test-client-domain-unsupported" + return 0 + fi + + return 1 +} + # log_dsp_remoteproc_status # Log runtime remoteproc state for every FastRPC firmware alias in the domain table. # Inputs: runtime DT and remoteproc sysfs through shared helpers. Output: no stdout contract. From fe29eb36dd12d549b8113e7e1be283778b2505c9 Mon Sep 17 00:00:00 2001 From: Srikanth Muppandam Date: Thu, 1 Oct 2026 10:11:19 +0530 Subject: [PATCH 2/2] pkg: align CentOS overlay repository setup Prepare EPEL and the Qualcomm CentOS 10 repositories through the shared RPM provider, refresh metadata, and add verified graphics, audio, camera, and video overlay package mappings. Preserve the existing Debian, Ubuntu, and Yocto paths. Signed-off-by: Srikanth Muppandam --- Runner/config/pkg_command_map.conf | 37 +++++--- .../Multimedia/Audio/AudioPlayback/Read_me.md | 12 +++ .../Multimedia/Audio/AudioPlayback/run.sh | 8 +- .../Multimedia/Audio/AudioRecord/Read_me.md | 12 ++- .../Multimedia/Audio/AudioRecord/run.sh | 2 +- .../README_Audio_Card_Registration.md | 5 ++ .../Audio/Audio_Card_Registration/run.sh | 11 ++- .../Camera/Camera_NHX/README_Camera_NHX.md | 15 +++- .../README.md | 3 +- .../README.md | 3 +- .../Graphics/KMSCube/README_KMSCube.md | 14 +++ .../suites/Multimedia/Graphics/KMSCube/run.sh | 3 + .../Video/Video_V4L2_Runner/README_Video.md | 6 +- .../Multimedia/Video/Video_V4L2_Runner/run.sh | 44 ++++++++++ Runner/utils/audio_common.sh | 53 +++++++---- Runner/utils/lib_fastcv.sh | 16 +--- Runner/utils/lib_pkg_provider.sh | 87 +++++++++++++++++-- 17 files changed, 264 insertions(+), 67 deletions(-) diff --git a/Runner/config/pkg_command_map.conf b/Runner/config/pkg_command_map.conf index 1da8577c..eb9d5664 100755 --- a/Runner/config/pkg_command_map.conf +++ b/Runner/config/pkg_command_map.conf @@ -280,11 +280,13 @@ ubuntu:package-set:fastrpc=fastrpc-support fastrpc-tests debian:package-set:fastcv-runtime=qcom-fastcv-binaries libfastcvopt-dev ubuntu:package-set:fastcv-runtime=qcom-fastcv-binaries libfastcvopt-dev -centos:package-set:fastcv-rpm-prerequisites=epel-release centos:package-set:fastcv-runtime=qcom-fastcv-binaries libfastcvopt-devel -rhel:package-set:fastcv-rpm-prerequisites=epel-release rhel:package-set:fastcv-runtime=qcom-fastcv-binaries libfastcvopt-devel +# Shared prerequisite for explicit Qualcomm RPM package preparation. +centos:package-set:qualcomm-rpm-prerequisites=epel-release +rhel:package-set:qualcomm-rpm-prerequisites=epel-release + # --------------------------------------------------------------------------- # Qualcomm MinkIPC runtime and test packages. # @@ -350,13 +352,15 @@ ubuntu:package-set:urm=userspace-resource-manager userspace-resource-manager-tes # for example: # ./run.sh --overlay # -# Currently available from qli-staging. Once promoted to qli, only the source -# selection in the caller needs to change. The package-set name remains graphics. +# Debian packages are currently available from qli-staging. Once promoted to +# qli, only the source selection in the caller needs to change. CentOS packages +# use the Qualcomm production RPM repositories. # # DKMS packages are skipped by lib_pkg_provider.sh when matching kernel headers # are unavailable. Remaining userspace packages continue to install. # -# No qcom-distro/rpm mapping is provided, so Yocto remains no-op. +# CentOS Stream 10 uses the verified Qualcomm RPM package names below. +# No qcom-distro mapping is provided, so Yocto remains no-op. # --------------------------------------------------------------------------- # Qualcomm proprietary graphics overlay package set. @@ -371,16 +375,19 @@ ubuntu:package-set:graphics-base=libegl-mesa0 libgl1-mesa-dri libgbm1 libegl1 li # Qualcomm proprietary graphics overlay package set for Ubuntu. ubuntu:package-set:graphics=kgsl-dkms adreno-common libgbm-msm adreno-gles1 adreno-gles2 adreno-egl1 adreno-vulkan-icd adreno-opencl-icd adreno-opencl-dev +# CentOS Stream 10 Qualcomm graphics overlay. gbm-msm-backend is listed +# explicitly because graphics validation checks the installed GBM backend. +centos:package-set:graphics=gbm-msm-backend adreno-egl1 adreno-gles2 adreno-opencl-icd adreno-vulkan-icd + # --------------------------------------------------------------------------- # Audio validation package recovery. # -# Debian Audio tests use the upstream base Audio stack by default. -# Qualcomm AudioReach packages are installed only when --overlay is explicitly -# requested. +# Debian and CentOS Audio tests use the base Audio stack by default. Qualcomm +# AudioReach packages are installed only when --overlay is explicitly requested. # -# No rpm, opkg, qcom-distro, or generic provider package-set mapping is -# provided. Yocto and other embedded images therefore continue using their -# image-provided Audio stack without package recovery. +# CentOS Stream 10 uses the verified Qualcomm RPM package names below. No opkg, +# qcom-distro, or generic provider package-set mapping is provided, so Yocto +# and other embedded images continue using their image-provided Audio stack. # --------------------------------------------------------------------------- # Base Debian Audio stack. @@ -397,6 +404,9 @@ ubuntu:package-set:audio-desktop=pipewire pipewire-pulse wireplumber pipewire-bi # This package set is complete by itself because overlay mode checks only # "audio"; it does not check "audio-base" first. debian:package-set:audio=alsa-utils pipewire-bin wireplumber pulseaudio-utils audioreach-pipewire-plugin audioreach-kernel-dkms audioreach-config + +# CentOS Stream 10 Qualcomm AudioReach overlay. +centos:package-set:audio=audioreach-dkms audioreach-pal audioreach-pipewire-plugin # Command recovery used by check_dependencies()/pkg_ensure_command(). apt:aplay=alsa-utils @@ -463,4 +473,7 @@ centos:Sensors:ssc_drva_test=qcom-sensors-test-core qcom-sensors-test-apps debian:package-set:camera-nhx=camx-dkms camx-glymur libcamx-glymur1 camx-firmware-glymur camx-nhx ubuntu:package-set:camera-nhx=camx-dkms camx-glymur libcamx-glymur1 camx-firmware-glymur camx-nhx -centos:package-set:camera-nhx=camx-dkms camx-glymur libcamx-glymur1 camx-firmware-glymur camx-nhx +centos:package-set:camera-nhx=camx-dkms camx-firmware-kodiak camx-kodiak libcamx-kodiak1 + +# CentOS Stream 10 Qualcomm Iris video overlay. +centos:package-set:video-overlay=iris-vpu diff --git a/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md b/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md index 0878576f..dab31bc4 100644 --- a/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md +++ b/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md @@ -86,6 +86,18 @@ the download when neither tool is provided by the image. The optional `snd-soc-wcd938x` codec module is loaded only when the running kernel provides it. Targets without that module are unchanged. +### CentOS Stream 10 overlay preparation + +An explicit `./run.sh --overlay` request ensures EPEL and the Qualcomm CentOS +10 aarch64 and noarch repositories, refreshes DNF metadata, and installs: + +```text +audioreach-dkms audioreach-pal audioreach-pipewire-plugin +``` + +If the DKMS package changes, the suite requests a reboot before validation. +Base mode continues to use the components provided by the CentOS image. + ```sh # Let the suite detect a server or desktop Ubuntu image ./run.sh --clip-name "playback_config1 playback_config7" diff --git a/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh b/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh index 02b65616..e868672b 100755 --- a/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh +++ b/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh @@ -113,7 +113,7 @@ EXTRACT_AUDIO_ASSETS="${EXTRACT_AUDIO_ASSETS:-true}" ENABLE_NETWORK_DOWNLOAD="${ENABLE_NETWORK_DOWNLOAD:-false}" # Default: no network operations AUDIO_CLIPS_BASE_DIR="${AUDIO_CLIPS_BASE_DIR:-}" # Custom path for audio clips (CI use) -# Only the explicit --overlay option enables Debian AudioReach preparation. +# Only the explicit --overlay option enables AudioReach package preparation. # AUDIO_OVERLAY_REQUESTED was derived above without consuming the CLI. AUDIO_PLAYBACK_VOLUME="${AUDIO_PLAYBACK_VOLUME:-1.0}" export AUDIO_OVERLAY_REQUESTED AUDIO_PLAYBACK_VOLUME @@ -149,9 +149,9 @@ Usage: $0 [options] --backend {pipewire|pulseaudio|alsa} --sink {speakers|null} --overlay - On Debian, ensure the Qualcomm AudioReach package set and prepare the - PipeWire runtime before playback. Without this flag, use the native/base - audio stack. qcom-distro/Yocto remains unchanged. + On Debian or CentOS, ensure the Qualcomm AudioReach package set before + playback. Debian also prepares its PipeWire runtime. Without this flag, + use the native/base audio stack. qcom-distro/Yocto remains unchanged. --formats "wav" # Legacy matrix mode only --durations "short|short medium" # Legacy matrix mode only (not recommended for new tests) --clip-name "play_48KHz_16b_2ch" # Test specific clip(s) by name (space-separated) diff --git a/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md b/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md index 59298505..b00ffc74 100644 --- a/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md +++ b/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md @@ -79,9 +79,15 @@ Before backend discovery, the suite enumerates runtime remoteprocs and checks th If the matching remoteproc is `running`, the suite records its name and firmware evidence. If it is `offline`, the suite starts it only after confirming the corresponding firmware is provisioned. Generic audio DSP paths also require adjacent topology evidence. Shikra's modem-hosted path does not require an adjacent topology file because its public image packages `qdsp6sw` modem firmware and `lpaicp` audio firmware separately. The suite never stops a remoteproc. Platforms with no applicable audio remoteproc continue normally. Provisioning or start issues produce a clean skip with the reason. -## Overlay Build Support - -For overlay builds using audioreach kernel modules, the test automatically: +## Overlay Build Support + +On CentOS Stream 10, an explicit `./run.sh --overlay` request ensures EPEL and +the Qualcomm aarch64 and noarch RPM repositories, refreshes DNF metadata, and +installs `audioreach-dkms`, `audioreach-pal`, and +`audioreach-pipewire-plugin`. If the DKMS package changes, reboot before +rerunning validation. Yocto remains image-provided and non-installing. + +For overlay builds using audioreach kernel modules, the test automatically: - Detects the overlay build configuration - Sets required DMA heap permissions - Restarts PipeWire service diff --git a/Runner/suites/Multimedia/Audio/AudioRecord/run.sh b/Runner/suites/Multimedia/Audio/AudioRecord/run.sh index 924dda59..71d7d5cc 100755 --- a/Runner/suites/Multimedia/Audio/AudioRecord/run.sh +++ b/Runner/suites/Multimedia/Audio/AudioRecord/run.sh @@ -133,7 +133,7 @@ usage() { Usage: $0 [options] --backend {pipewire|pulseaudio|alsa} --source {mic|null} - --overlay Prepare the Debian Qualcomm AudioReach overlay + --overlay Prepare the Debian or CentOS Qualcomm AudioReach overlay Without this flag, use the native/base stack. --config-name "record_config1" # Test specific config(s) by name (space-separated) # Also supports record_config1, record_config2, ..., record_config10 diff --git a/Runner/suites/Multimedia/Audio/Audio_Card_Registration/README_Audio_Card_Registration.md b/Runner/suites/Multimedia/Audio/Audio_Card_Registration/README_Audio_Card_Registration.md index cc4d287a..452e4ab3 100644 --- a/Runner/suites/Multimedia/Audio/Audio_Card_Registration/README_Audio_Card_Registration.md +++ b/Runner/suites/Multimedia/Audio/Audio_Card_Registration/README_Audio_Card_Registration.md @@ -111,6 +111,11 @@ The test reports `FAIL` when: ## Command Line Usage +On CentOS Stream 10, `--overlay` prepares EPEL and the Qualcomm aarch64 and +noarch RPM repositories, refreshes DNF metadata, and installs +`audioreach-dkms`, `audioreach-pal`, and `audioreach-pipewire-plugin`. The +default mode continues to use image-provided audio components. + ```sh ./run.sh [options] ``` diff --git a/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh b/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh index 3e2531fc..032dd3b4 100755 --- a/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh +++ b/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh @@ -6,7 +6,7 @@ # - validates ALSA sound card registration # - validates /dev/snd/controlC nodes # - optionally validates PCM/playback/capture entries -# - optionally prepares Debian AudioReach packages with --overlay +# - optionally prepares Debian or CentOS AudioReach packages with --overlay # - does not start/restart PipeWire, PulseAudio, ADSP, or remoteproc # - does not play or record audio @@ -49,7 +49,7 @@ fi TESTNAME="Audio_Card_Registration" -# Only the explicit --overlay option enables Debian AudioReach preparation. +# Only the explicit --overlay option enables AudioReach package preparation. # Ignore inherited values so native/base mode remains the default. AUDIO_OVERLAY_REQUESTED=0 AUDIO_EARLY_HELP_REQUESTED=0 @@ -70,9 +70,9 @@ Usage: $0 [options] Options: --overlay - On Debian, ensure the Qualcomm AudioReach package set before validating - ALSA card registration. Without this flag, use the native/base audio - stack. This test never starts or restarts PipeWire. + On Debian or CentOS, ensure the Qualcomm AudioReach package set before + validating ALSA card registration. Without this flag, use the + native/base audio stack. This test never starts or restarts PipeWire. --wait-secs N Wait time for ALSA sound card registration. @@ -547,4 +547,3 @@ fi log_info "------------------- Completed $TESTNAME Testcase --------------------------" exit 0 - diff --git a/Runner/suites/Multimedia/Camera/Camera_NHX/README_Camera_NHX.md b/Runner/suites/Multimedia/Camera/Camera_NHX/README_Camera_NHX.md index 0481659c..8cd42f81 100644 --- a/Runner/suites/Multimedia/Camera/Camera_NHX/README_Camera_NHX.md +++ b/Runner/suites/Multimedia/Camera/Camera_NHX/README_Camera_NHX.md @@ -111,13 +111,24 @@ Snapshot JSON files are currently expected only for targets where the files are ## Desktop CAMX overlay flow Yocto and meta-qcom LAVA images keep their image-provided camera stack and do -not use this flow. On Debian, Ubuntu, and CentOS, an explicit overlay request -installs the `camera-nhx` package set: +not use this flow. On Debian and Ubuntu, an explicit overlay request installs +the `camera-nhx` package set: ```text camx-dkms camx-glymur libcamx-glymur1 camx-firmware-glymur camx-nhx ``` +On CentOS Stream 10, the runner follows the Qualcomm overlay installation +guide and installs the Kodiak package set: + +```text +camx-dkms camx-firmware-kodiak camx-kodiak libcamx-kodiak1 +``` + +Before a missing CentOS package is installed, the shared package provider +ensures EPEL and both `qualcomm-linux-aarch64` and +`qualcomm-linux-noarch` repositories are enabled, then refreshes DNF metadata. + `--overlay` requires the CAMX FIT DTB and uses the compatibility name `camx`. The same requirement can be stated explicitly with `--fit-dtb camx`: diff --git a/Runner/suites/Multimedia/FastCV/FastCV_Module_Functional_Validation/README.md b/Runner/suites/Multimedia/FastCV/FastCV_Module_Functional_Validation/README.md index 1becbc73..c9d53ca9 100644 --- a/Runner/suites/Multimedia/FastCV/FastCV_Module_Functional_Validation/README.md +++ b/Runner/suites/Multimedia/FastCV/FastCV_Module_Functional_Validation/README.md @@ -59,7 +59,8 @@ https://softwarecenter.qualcomm.com/nexus/rpm/centos/10/os/noarch/ When neither repository ID is already enabled, the suite creates `/etc/yum.repos.d/qualcomm-linux.repo` with the `qualcomm-linux-aarch64` and `qualcomm-linux-noarch` definitions from the RPM -image setup guide. It then checks and installs: +image setup guide. The suite runs the documented metadata cleanup and cache +refresh before it checks and installs: ```text qcom-fastcv-binaries libfastcvopt-devel diff --git a/Runner/suites/Multimedia/FastCV/FastCV_Simple_Deinterleave_Validation/README.md b/Runner/suites/Multimedia/FastCV/FastCV_Simple_Deinterleave_Validation/README.md index 87e6e41f..fc98bd86 100644 --- a/Runner/suites/Multimedia/FastCV/FastCV_Simple_Deinterleave_Validation/README.md +++ b/Runner/suites/Multimedia/FastCV/FastCV_Simple_Deinterleave_Validation/README.md @@ -54,7 +54,8 @@ https://softwarecenter.qualcomm.com/nexus/rpm/centos/10/os/noarch/ ``` When needed, their definitions are written to -`/etc/yum.repos.d/qualcomm-linux.repo`. The suite then checks and installs: +`/etc/yum.repos.d/qualcomm-linux.repo`. The suite runs the documented metadata +cleanup and cache refresh before it checks and installs: ```text qcom-fastcv-binaries libfastcvopt-devel diff --git a/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md b/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md index 2dd17975..91a26489 100644 --- a/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md +++ b/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md @@ -79,3 +79,17 @@ sh-5.2# - It validates the graphics gles2 functionalities. - If any critical tool is missing, the script exits with an error message. + +## CentOS Stream 10 overlay preparation + +An explicit `./run.sh --overlay` request uses the shared package provider to +ensure EPEL and the Qualcomm CentOS 10 aarch64 and noarch repositories, refresh +DNF metadata, and install the documented Adreno overlay packages: + +```text +adreno-egl1 adreno-gles2 adreno-opencl-icd adreno-vulkan-icd +``` + +The `gbm-msm-backend` dependency is tracked explicitly because this suite +validates the Qualcomm GBM backend before running KMSCube. Yocto execution +continues to use image-provided components. diff --git a/Runner/suites/Multimedia/Graphics/KMSCube/run.sh b/Runner/suites/Multimedia/Graphics/KMSCube/run.sh index 2f35ba04..5dd400c0 100755 --- a/Runner/suites/Multimedia/Graphics/KMSCube/run.sh +++ b/Runner/suites/Multimedia/Graphics/KMSCube/run.sh @@ -119,6 +119,9 @@ if [ -z "$GPU_OVERLAY_GBM_PACKAGE" ]; then ubuntu) GPU_OVERLAY_GBM_PACKAGE="libgbm-msm" ;; + centos|rhel) + GPU_OVERLAY_GBM_PACKAGE="gbm-msm-backend" + ;; *) GPU_OVERLAY_GBM_PACKAGE="libgbm-msm1" ;; diff --git a/Runner/suites/Multimedia/Video/Video_V4L2_Runner/README_Video.md b/Runner/suites/Multimedia/Video/Video_V4L2_Runner/README_Video.md index a5d3d5fb..3c312f90 100644 --- a/Runner/suites/Multimedia/Video/Video_V4L2_Runner/README_Video.md +++ b/Runner/suites/Multimedia/Video/Video_V4L2_Runner/README_Video.md @@ -156,6 +156,11 @@ cd /Runner > **Default remains unchanged.** If you omit all `--ko-*` flags, the runner uses the system module tree and `modinfo`/`modprobe` resolution only. +On CentOS Stream 10, selecting `--stack downstream`, `--stack overlay`, or the +overlay half of `--stack both` ensures EPEL and both Qualcomm RPM repositories, +refreshes DNF metadata, and installs the documented `iris-vpu` overlay package. +Yocto and other image-managed systems continue to use image-provided packages. + --- ## Pre‑Flight: Rootfs Size & Network @@ -350,4 +355,3 @@ export VIDEO_INTER_TEST_SLEEP=3 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. --- - diff --git a/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh b/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh index 72fa5bdc..2bc8c5f1 100755 --- a/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh +++ b/Runner/suites/Multimedia/Video/Video_V4L2_Runner/run.sh @@ -38,6 +38,11 @@ fi # shellcheck disable=SC1091 . "$TOOLS/lib_video.sh" +if [ -r "$TOOLS/lib_pkg_provider.sh" ]; then + # shellcheck disable=SC1090,SC1091 + . "$TOOLS/lib_pkg_provider.sh" +fi + TESTNAME="Video_V4L2_Runner" RES_FILE="./${TESTNAME}.res" @@ -750,6 +755,45 @@ VIDEO_STACK="$(video_normalize_stack "$VIDEO_STACK")" pre_stack="$(video_stack_status "$plat")" log_info "Current video stack (pre): $pre_stack" +VIDEO_OS_ID="unknown" +if command -v pkg_detect_os_id >/dev/null 2>&1; then + VIDEO_OS_ID="$(pkg_detect_os_id 2>/dev/null || true)" +elif [ -r /etc/os-release ]; then + VIDEO_OS_ID="$( + sed -n 's/^ID=//p' /etc/os-release | + sed -n '1p' | + tr -d '"' | + tr '[:upper:]' '[:lower:]' + )" +fi + +if [ "$VIDEO_STACK" = "downstream" ] && + [ "$VIDEO_OS_ID" = "centos" ]; then + for required_helper in \ + pkg_provider_init \ + pkg_ensure_optional_package_set_present; do + if ! command -v "$required_helper" >/dev/null 2>&1; then + log_fail "$TESTNAME FAIL - required video overlay package helper is unavailable: $required_helper" + printf '%s\n' "$TESTNAME FAIL" >"$RES_FILE" + exit 0 + fi + done + + pkg_provider_init + + if ! pkg_ensure_optional_package_set_present \ + video-overlay \ + none \ + auto \ + --overlay; then + log_fail "$TESTNAME FAIL - failed to ensure Qualcomm video overlay package set" + printf '%s\n' "$TESTNAME FAIL" >"$RES_FILE" + exit 0 + fi + + log_pass "Qualcomm video overlay package set is ready" +fi + # Kodiak + upstream → install backup firmware to /lib/firmware before switching if [ "$plat" = "kodiak" ]; then case "$VIDEO_STACK" in diff --git a/Runner/utils/audio_common.sh b/Runner/utils/audio_common.sh index ae5c744e..e7da4fb1 100755 --- a/Runner/utils/audio_common.sh +++ b/Runner/utils/audio_common.sh @@ -5016,6 +5016,8 @@ audio_prepare_audioreach_udev_rule() { # Debian overlay - ensure audio-base and Debian AudioReach package sets # Ubuntu server - ensure ALSA utilities # Ubuntu desktop - ensure ALSA, PipeWire, PipeWire-Pulse, and WirePlumber +# CentOS base - use image-provided components +# CentOS overlay - ensure the documented Qualcomm AudioReach RPM set # other distros - no-op until their package mappings are verified # # Environment: @@ -5071,7 +5073,7 @@ audio_prepare_test_packages() { log_info "Native image detected, Audio package preparation is not required" return 0 ;; - debian|ubuntu) + debian|ubuntu|centos) ;; *) log_info "Audio package preparation is not enabled for os=$atp_os_id" @@ -5079,7 +5081,7 @@ audio_prepare_test_packages() { ;; esac - # Debian and Ubuntu package preparation must run from root orchestration. + # Host-distribution package preparation must run from root orchestration. if [ "$(id -u 2>/dev/null || echo 1)" -ne 0 ]; then log_fail "Audio package preparation must run as root, os=$atp_os_id" return 1 @@ -5148,6 +5150,12 @@ audio_prepare_test_packages() { return 0 fi + if [ "$atp_os_id" = "centos" ] && + [ "$atp_overlay_requested" -eq 0 ]; then + log_info "CentOS base Audio mode uses image-provided components" + return 0 + fi + ########################################################################### # Debian base mode ########################################################################### @@ -5169,7 +5177,7 @@ audio_prepare_test_packages() { fi ########################################################################### - # Debian AudioReach overlay mode + # Debian and CentOS AudioReach overlay mode ########################################################################### if ! command -v pkg_ensure_optional_package_set_present \ @@ -5184,24 +5192,37 @@ audio_prepare_test_packages() { return 1 fi + case "$atp_os_id" in + centos) + atp_plugin_package="audioreach-pipewire-plugin" + atp_dkms_package="audioreach-dkms" + atp_support_package="audioreach-pal" + ;; + *) + atp_plugin_package="audioreach-pipewire-plugin" + atp_dkms_package="audioreach-kernel-dkms" + atp_support_package="audioreach-config" + ;; + esac + # Capture AudioReach package versions before package preparation. These # values let us distinguish an already-ready target from an install or # upgrade performed during this invocation. atp_before_plugin="$( pkg_installed_package_version \ - audioreach-pipewire-plugin 2>/dev/null || + "$atp_plugin_package" 2>/dev/null || true )" atp_before_dkms="$( pkg_installed_package_version \ - audioreach-kernel-dkms 2>/dev/null || + "$atp_dkms_package" 2>/dev/null || true )" - atp_before_config="$( + atp_before_support="$( pkg_installed_package_version \ - audioreach-config 2>/dev/null || + "$atp_support_package" 2>/dev/null || true )" @@ -5214,31 +5235,31 @@ audio_prepare_test_packages() { auto \ --overlay \ "$@"; then - log_fail "Failed to ensure Debian AudioReach package set" + log_fail "Failed to ensure $atp_os_id AudioReach package set" return 1 fi atp_after_plugin="$( pkg_installed_package_version \ - audioreach-pipewire-plugin 2>/dev/null || + "$atp_plugin_package" 2>/dev/null || true )" atp_after_dkms="$( pkg_installed_package_version \ - audioreach-kernel-dkms 2>/dev/null || + "$atp_dkms_package" 2>/dev/null || true )" - atp_after_config="$( + atp_after_support="$( pkg_installed_package_version \ - audioreach-config 2>/dev/null || + "$atp_support_package" 2>/dev/null || true )" if [ "$atp_before_plugin" != "$atp_after_plugin" ] || [ "$atp_before_dkms" != "$atp_after_dkms" ] || - [ "$atp_before_config" != "$atp_after_config" ]; then + [ "$atp_before_support" != "$atp_after_support" ]; then AUDIO_OVERLAY_PACKAGES_CHANGED=1 export AUDIO_OVERLAY_PACKAGES_CHANGED @@ -5248,8 +5269,8 @@ audio_prepare_test_packages() { log_info "AudioReach PipeWire plugin version changed: ${atp_before_plugin:-not-installed} -> ${atp_after_plugin:-not-installed}" fi - if [ "$atp_before_config" != "$atp_after_config" ]; then - log_info "AudioReach configuration version changed: ${atp_before_config:-not-installed} -> ${atp_after_config:-not-installed}" + if [ "$atp_before_support" != "$atp_after_support" ]; then + log_info "AudioReach support package changed, package=$atp_support_package version=${atp_before_support:-not-installed}->${atp_after_support:-not-installed}" fi if [ "$atp_before_dkms" != "$atp_after_dkms" ]; then @@ -5285,7 +5306,7 @@ audio_prepare_test_packages() { return 1 fi - log_pass "Debian AudioReach package set is ready" + log_pass "$atp_os_id AudioReach package set is ready" return 0 } diff --git a/Runner/utils/lib_fastcv.sh b/Runner/utils/lib_fastcv.sh index 4b0375d2..fa699b74 100755 --- a/Runner/utils/lib_fastcv.sh +++ b/Runner/utils/lib_fastcv.sh @@ -102,6 +102,7 @@ fastcv_prepare_runtime_packages() { for fcprp_helper in \ pkg_provider_init \ pkg_ensure_host_distro_package_set_present \ + pkg_prepare_qualcomm_rpm_overlay_repositories \ pkg_ensure_required_package_set_present \ pkg_verify_package_set_installed \ pkg_package_recovery_supported_os; do @@ -132,20 +133,7 @@ fastcv_prepare_runtime_packages() { case "$fcprp_os_id" in centos|rhel) - if ! command -v pkg_ensure_qualcomm_rpm_repository >/dev/null 2>&1; then - log_error "FastCV RPM repository preparation helper is unavailable" - fcprp_rc=1 - elif ! pkg_ensure_required_package_set_present \ - fastcv-rpm-prerequisites; then - log_error "FastCV EPEL repository prerequisite installation failed, os=$fcprp_os_id package=epel-release" - fcprp_rc=1 - elif ! command -v pkg_rpm_repository_enabled >/dev/null 2>&1; then - log_error "FastCV RPM repository verification helper is unavailable" - fcprp_rc=1 - elif ! pkg_rpm_repository_enabled epel; then - log_error "FastCV EPEL repository is not enabled after installing epel-release, os=$fcprp_os_id repository=epel" - fcprp_rc=1 - elif ! pkg_ensure_qualcomm_rpm_repository; then + if ! pkg_prepare_qualcomm_rpm_overlay_repositories; then fcprp_rc=1 fi ;; diff --git a/Runner/utils/lib_pkg_provider.sh b/Runner/utils/lib_pkg_provider.sh index f3337b67..92193354 100755 --- a/Runner/utils/lib_pkg_provider.sh +++ b/Runner/utils/lib_pkg_provider.sh @@ -619,6 +619,12 @@ pkg_ensure_optional_package_set() { rm -f "${PKG_APT_UPDATED_MARK:-/tmp/qcom_testkit_apt_updated}" 2>/dev/null || true fi ;; + rpm) + if ! pkg_prepare_qualcomm_rpm_overlay_repositories; then + pkg_log_fail "Qualcomm RPM overlay repository preparation failed, os=$optional_os_id set=$optional_set_name" + return 1 + fi + ;; esac pkg_log_info "Optional package-set recovery requested, os=$optional_os_id provider=$optional_provider set=$optional_set_name packages=$optional_packages" @@ -1656,7 +1662,7 @@ pkg_rpm_repository_enabled() { esac [ -n "$prre_tool" ] || return 1 - if ! prre_repo_list="$($prre_tool repolist enabled 2>/dev/null)"; then + if ! prre_repo_list="$($prre_tool repolist 2>/dev/null)"; then return 1 fi @@ -1671,8 +1677,8 @@ pkg_rpm_repository_enabled() { # Returns: 0 when both repositories are already enabled or configured, and # 1 when the RPM provider, privileges, architecture, OS version, or # configuration fails. -# Side effects: may create PKG_QCOM_RPM_REPO_FILE and invalidate the RPM -# metadata-update marker. Existing repository definitions are not overwritten. +# Side effects: may create PKG_QCOM_RPM_REPO_FILE and refresh RPM metadata. +# Existing repository definitions are not overwritten. pkg_ensure_qualcomm_rpm_repository() { qrr_os_id="$(pkg_detect_os_id)" qrr_os_version="$(pkg_os_release_value VERSION_ID || true)" @@ -1699,7 +1705,7 @@ pkg_ensure_qualcomm_rpm_repository() { return 1 fi - if ! qrr_repo_list="$($qrr_tool repolist enabled 2>/dev/null)"; then + if ! qrr_repo_list="$($qrr_tool repolist 2>/dev/null)"; then pkg_log_fail "Could not inspect enabled RPM repositories, tool=$qrr_tool" return 1 fi @@ -1787,7 +1793,7 @@ pkg_ensure_qualcomm_rpm_repository() { rm -f "$qrr_temp_file" rm -f "$PKG_RPM_UPDATED_MARK" 2>/dev/null || true - if ! qrr_repo_list="$($qrr_tool repolist enabled 2>/dev/null)"; then + if ! qrr_repo_list="$($qrr_tool repolist 2>/dev/null)"; then pkg_log_fail "Could not verify enabled Qualcomm RPM repositories, tool=$qrr_tool file=$PKG_QCOM_RPM_REPO_FILE" rm -f "$PKG_QCOM_RPM_REPO_FILE" return 1 @@ -1803,7 +1809,12 @@ pkg_ensure_qualcomm_rpm_repository() { return 1 fi - pkg_log_pass "Configured Qualcomm RPM repositories, file=$PKG_QCOM_RPM_REPO_FILE" + if ! pkg_rpm_update; then + pkg_log_fail "Qualcomm RPM repositories were configured but metadata refresh failed, file=$PKG_QCOM_RPM_REPO_FILE" + return 1 + fi + + pkg_log_pass "Configured Qualcomm RPM repositories and refreshed metadata, file=$PKG_QCOM_RPM_REPO_FILE" return 0 } @@ -1840,6 +1851,70 @@ pkg_rpm_update() { return "$rpm_update_rc" } +# pkg_prepare_qualcomm_rpm_overlay_repositories +# Prepare the documented CentOS 10 repositories used by Qualcomm overlays. +# Inputs: none. Output: no machine-readable stdout contract. +# Returns: 0 when EPEL and both Qualcomm repositories are enabled with current +# metadata, 1 when repository preparation fails, and 0 when not applicable. +# Side effects: on supported CentOS/RHEL aarch64 targets, may install +# epel-release, create PKG_QCOM_RPM_REPO_FILE, clean RPM metadata, and rebuild +# the package-manager cache. Call only from explicit package preparation paths. +pkg_prepare_qualcomm_rpm_overlay_repositories() { + pqr_os_id="$(pkg_detect_os_id)" + pqr_provider="$(pkg_active_provider)" + pqr_epel_was_installed=0 + + case "$pqr_os_id" in + centos|rhel) + ;; + *) + return 0 + ;; + esac + + if [ "$pqr_provider" != "rpm" ]; then + pkg_log_fail "Qualcomm RPM overlay repository preparation requires the rpm provider, os=$pqr_os_id provider=$pqr_provider" + return 1 + fi + + if pkg_have_package epel-release; then + pqr_epel_was_installed=1 + fi + + if ! pkg_ensure_required_package_set_present \ + qualcomm-rpm-prerequisites; then + pkg_log_fail "EPEL repository prerequisite installation failed, os=$pqr_os_id package=epel-release" + return 1 + fi + + if ! pkg_rpm_repository_enabled epel; then + pkg_log_fail "EPEL repository is not enabled after installing epel-release, os=$pqr_os_id repository=epel" + return 1 + fi + + if [ "$pqr_epel_was_installed" -eq 0 ]; then + rm -f "$PKG_RPM_UPDATED_MARK" 2>/dev/null || true + fi + + if ! pkg_ensure_qualcomm_rpm_repository; then + return 1 + fi + + if ! pkg_rpm_repository_enabled qualcomm-linux-aarch64 || + ! pkg_rpm_repository_enabled qualcomm-linux-noarch; then + pkg_log_fail "Qualcomm RPM repository verification failed, required=qualcomm-linux-aarch64,qualcomm-linux-noarch" + return 1 + fi + + if ! pkg_rpm_update; then + pkg_log_fail "Qualcomm RPM overlay metadata refresh failed" + return 1 + fi + + pkg_log_pass "Qualcomm RPM overlay repositories are ready, repositories=epel,qualcomm-linux-aarch64,qualcomm-linux-noarch" + return 0 +} + # Optionally upgrade rpm packages. pkg_rpm_upgrade() { rpm_tool="$(pkg_rpm_tool || true)"