diff --git a/Runner/config/pkg_command_map.conf b/Runner/config/pkg_command_map.conf index 246212e24..54d6e5607 100755 --- a/Runner/config/pkg_command_map.conf +++ b/Runner/config/pkg_command_map.conf @@ -115,7 +115,9 @@ ubuntu:benchmark_model=tensorflow-lite-qcom-apps debian:qnn-net-run=qnn-tools ubuntu:qnn-net-run=qnn-tools -# Audio asset downloads use only image-provided curl or wget clients. +# AudioPlayback installs this complete set on Ubuntu only when a requested +# network asset is missing and neither downloader is already available. +ubuntu:package-set:audio-download=curl wget # --------------------------------------------------------------------------- # Bluetooth userspace stack and firmware. @@ -304,10 +306,9 @@ opkg:Sensors:sns_test=qcom-sensors-api qcom-sensors-core qcom-sensors-registry q # --------------------------------------------------------------------------- # Qualcomm FastRPC package set. # -# Used by tests that explicitly call: -# pkg_ensure_package_set fastrpc -# or: -# pkg_ensure_optional_package_set fastrpc ... +# The FastRPC test uses this complete set when /usr/bin/fastrpc_test is missing +# on a host distribution with an exact mapping. Recovery uses the target's +# configured repositories. # # No qcom-distro/rpm mapping is provided, so Yocto remains no-op unless a # supported mapping is added later. @@ -435,6 +436,7 @@ centos:package-set:graphics=kgsl-dkms gbm-msm-backend adreno-common adreno-gles1 # # Debian and CentOS Audio tests use the base Audio stack by default. Qualcomm # AudioReach packages are installed only when --overlay is explicitly requested. +# Ubuntu supports only its base server or desktop Audio package profile. # # 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 @@ -465,7 +467,7 @@ centos:package-set:audio-client-pulseaudio=pulseaudio-utils # # 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 +debian:package-set:audio=alsa-utils pipewire-bin wireplumber pulseaudio-utils audioreach-pipewire-plugin audioreach-dkms audioreach-conf # CentOS Stream 10 Qualcomm AudioReach overlay. centos:package-set:audio=audioreach-dkms audioreach-pal audioreach-pipewire-plugin diff --git a/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md b/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md index 078f97c84..159c1d976 100644 --- a/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md +++ b/Runner/suites/Multimedia/Audio/AudioPlayback/Read_me.md @@ -85,10 +85,12 @@ Yocto continues to use image-provided clients. When run as root, the suite uses the shared package provider to install missing Ubuntu audio packages. It does not run a blanket distribution upgrade. -Network download uses an image-provided `curl` or `wget` and never installs a -downloader package at runtime. Each displayed download attempt runs one client -invocation with a finite deadline. When neither tool is available, the suite -skips the download and reports the missing image prerequisite. +When network download is requested and neither downloader is present, Ubuntu +uses the shared package provider to install the complete `audio-download` set, +`curl wget`, from the image's configured APT sources. Other distributions keep +their image-provided downloader policy. Each displayed download attempt has a +finite deadline. If recovery is unavailable or fails, the suite skips and +reports the missing prerequisite. If the target already has a valid global IPv4 address but the generic ICMP probe is blocked, the suite preserves the active interface and lets the bounded @@ -103,6 +105,9 @@ when network activation is actually required. The absence of - `server` ensures `alsa-utils` for ALSA playback. - `desktop` ensures `alsa-utils`, `pipewire`, `pipewire-pulse`, `wireplumber`, `pipewire-bin`, and `pulseaudio-utils`. +- AudioReach is not enabled for Ubuntu. An explicit `--overlay` request reports + SKIP before any AudioReach source refresh or package operation. Rerun without + `--overlay` to validate the Ubuntu base Audio stack. - Set `AUDIO_PACKAGE_UPDATE=1` only when installed packages should be upgraded as part of the test preparation. diff --git a/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh b/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh index b5a4ac566..d1c474347 100755 --- a/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh +++ b/Runner/suites/Multimedia/Audio/AudioPlayback/run.sh @@ -154,6 +154,7 @@ Usage: $0 [options] On Debian or CentOS, ensure the Qualcomm AudioReach package set before playback. Both prepare the regular-user PipeWire runtime. Without this flag, use the native/base audio stack. qcom-distro/Yocto remains unchanged. + Ubuntu reports SKIP because AudioReach is not enabled there. --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) @@ -291,6 +292,11 @@ case "$audio_prepare_rc" in echo "$RESULT_TESTNAME SKIP" >"$RES_FILE" exit 0 ;; + 3) + log_skip "$TESTNAME SKIP - AudioReach is not enabled for Ubuntu, rerun without --overlay to validate the base Audio stack" + echo "$RESULT_TESTNAME SKIP" >"$RES_FILE" + exit 0 + ;; *) log_fail "$TESTNAME FAIL - audio package preparation failed" echo "$RESULT_TESTNAME FAIL" >"$RES_FILE" @@ -777,7 +783,7 @@ if [ "$TOP_LEVEL_RUN" -eq 1 ]; then log_info "Audio clips downloaded and extracted successfully" else log_error "Failed to download or extract audio clips from: $AUDIO_TAR_URL" - log_skip "$TESTNAME SKIP - Audio clips download failed" + log_skip "$TESTNAME SKIP - audio clips could not be downloaded or extracted, enable Ubuntu package recovery for curl and wget with HTTPS access or pre-provision clips under ${AUDIO_CLIPS_BASE_DIR:-AudioClips}" echo "$RESULT_TESTNAME SKIP" >"$RES_FILE" exit 0 fi diff --git a/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md b/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md index f259fc481..58f0493d1 100644 --- a/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md +++ b/Runner/suites/Multimedia/Audio/AudioRecord/Read_me.md @@ -97,6 +97,10 @@ If the matching remoteproc is `running`, the suite records its name and firmware ## Overlay Build Support +AudioReach is not enabled for Ubuntu. An explicit `./run.sh --overlay` request +reports SKIP before any AudioReach source refresh or package operation. Rerun +without `--overlay` to validate the Ubuntu base Audio stack. + 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 diff --git a/Runner/suites/Multimedia/Audio/AudioRecord/run.sh b/Runner/suites/Multimedia/Audio/AudioRecord/run.sh index 6362855ee..f1cdc8899 100755 --- a/Runner/suites/Multimedia/Audio/AudioRecord/run.sh +++ b/Runner/suites/Multimedia/Audio/AudioRecord/run.sh @@ -135,6 +135,7 @@ Usage: $0 [options] --source {mic|null} --overlay Prepare the Debian or CentOS Qualcomm AudioReach overlay Without this flag, use the native/base stack. + Ubuntu reports SKIP because AudioReach is not enabled. --config-name "record_config1" # Test specific config(s) by name (space-separated) # Also supports record_config1, record_config2, ..., record_config10 --config-filter "48KHz" # Filter configs by pattern @@ -211,6 +212,11 @@ case "$audio_prepare_rc" in echo "$RESULT_TESTNAME SKIP" >"$RES_FILE" exit 0 ;; + 3) + log_skip "$TESTNAME SKIP - AudioReach is not enabled for Ubuntu, rerun without --overlay to validate the base Audio stack" + echo "$RESULT_TESTNAME SKIP" >"$RES_FILE" + exit 0 + ;; *) log_fail "$TESTNAME FAIL - audio package preparation failed" echo "$RESULT_TESTNAME FAIL" >"$RES_FILE" 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 517021b91..8b0099083 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 @@ -119,6 +119,10 @@ The test reports `FAIL` when: ## Command Line Usage +AudioReach is not enabled for Ubuntu. An explicit `--overlay` request reports +SKIP before any AudioReach source refresh or package operation. Run without +`--overlay` to validate Ubuntu ALSA card registration. + 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 diff --git a/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh b/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh index f6c18148d..c7c87f77d 100755 --- a/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh +++ b/Runner/suites/Multimedia/Audio/Audio_Card_Registration/run.sh @@ -73,6 +73,7 @@ Options: 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. + Ubuntu reports SKIP because AudioReach is not enabled there. --wait-secs N Wait time for ALSA sound card registration. @@ -173,6 +174,11 @@ case "$audio_prepare_rc" in echo "$TESTNAME SKIP" > "$RES_FILE" exit 0 ;; + 3) + log_skip "$TESTNAME SKIP: AudioReach is not enabled for Ubuntu, rerun without --overlay to validate the base Audio stack" + echo "$TESTNAME SKIP" > "$RES_FILE" + exit 0 + ;; *) log_fail "$TESTNAME FAIL: audio package preparation failed" echo "$TESTNAME FAIL" > "$RES_FILE" 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 6a517c3ea..300365d62 100644 --- a/Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test_README.md +++ b/Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test_README.md @@ -41,7 +41,10 @@ Supported capabilities: Have these on the target (or specify paths with the flags below): -- `fastrpc_test` binary (from [github.com/quic/fastrpc](https://github.com/quic/fastrpc)) +- `fastrpc_test` binary (from [github.com/quic/fastrpc](https://github.com/quic/fastrpc)). + Supported Debian and Ubuntu image repositories provide it through the + `fastrpc-tests` package. The mapped runtime set also includes + `fastrpc-support`. - Optional `fastrpc-healthcheck`. When installed, this is the primary distro-independent capability source. An installed healthcheck that fails, times out, or produces an unrecognized or malformed report fails the suite. Runtime fallback is used only when the tool @@ -56,8 +59,13 @@ Have these on the target (or specify paths with the flags below): 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 on Yocto, Debian, Ubuntu, CentOS, or other - distributions. Provision `fastrpc_test`, its host libraries, and DSP skeletons in the image. +- When the default `/usr/bin/fastrpc_test` is missing on Debian or Ubuntu, the + suite uses the shared package provider to recover the complete mapped + `fastrpc-support fastrpc-tests` set from the target's configured APT sources. + It does not add Debian `qli` sources on Ubuntu. +- Yocto, CentOS, and distributions without an exact package mapping remain + image-managed and report SKIP when the binary is absent. A missing binary in + an explicitly selected `--bin-dir` also reports SKIP without package changes. - Missing optional image assets are reported as SKIP unless the operator explicitly selected a domain whose required runtime library is absent. diff --git a/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh b/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh index b6f2cbd2c..b48ec7a0a 100755 --- a/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh +++ b/Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh @@ -35,6 +35,9 @@ fi # shellcheck disable=SC1091 . "$TOOLS/functestlib.sh" +# shellcheck disable=SC1090,SC1091 +. "$TOOLS/lib_pkg_provider.sh" + # shellcheck disable=SC1090,SC1091 . "$TOOLS/lib_fastrpc.sh" @@ -324,7 +327,28 @@ RUN_DIR="$BIN_DIR" RUN_BIN="$RUN_DIR/fastrpc_test" if [ ! -x "$RUN_BIN" ]; then - test_result_finish "SKIP" "$TESTNAME SKIP - image-provided fastrpc_test is unavailable, expected=$RUN_BIN" + if [ "$RUN_DIR" = "/usr/bin" ] && + command -v pkg_ensure_host_distro_package_set_present >/dev/null 2>&1; then + log_info "FastRPC test binary is unavailable, attempting mapped package recovery" + pkg_ensure_host_distro_package_set_present fastrpc + package_recovery_rc=$? + + case "$package_recovery_rc" in + 0) + if [ ! -x "$RUN_BIN" ]; then + test_result_finish "FAIL" "$TESTNAME FAIL - FastRPC package set was installed but fastrpc_test is still unavailable, expected=$RUN_BIN" + fi + ;; + 2) + test_result_finish "SKIP" "$TESTNAME SKIP - fastrpc_test is unavailable and no exact package recovery mapping applies to this operating system, expected=$RUN_BIN, provision the test binary in the image or use --bin-dir" + ;; + *) + test_result_finish "FAIL" "$TESTNAME FAIL - failed to recover the mapped FastRPC package set, expected packages=fastrpc-support fastrpc-tests binary=$RUN_BIN" + ;; + esac + else + test_result_finish "SKIP" "$TESTNAME SKIP - fastrpc_test is unavailable at the requested location, expected=$RUN_BIN, provision the test binary or select its directory with --bin-dir" + fi fi # -------------------- Logging root ----------------------------- diff --git a/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md b/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md index e7848206b..5c31fdbe9 100644 --- a/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md +++ b/Runner/suites/Multimedia/Graphics/KMSCube/README_KMSCube.md @@ -67,13 +67,27 @@ Direct runner usage: ```sh ./run.sh +./run.sh --base ./run.sh --overlay +./run.sh --auto +./run.sh --timeout 90 ./run.sh --help ``` -`--overlay` requests the Qualcomm graphics overlay on supported desktop -distributions. `-h` and `--help` print usage and exit without changing package, -GPU, display-manager, or Weston state. Unknown arguments are reported as FAIL. +Ubuntu Desktop defaults to `--overlay`, so a plain `./run.sh` validates the +Qualcomm KGSL/Adreno stack without requiring an explicit mode argument. Ubuntu +Server is treated as headless and reports SKIP before graphics package or DRM +runtime preparation. Debian, CentOS, RHEL, and Fedora default to `--base`. Use +`--base`, `--overlay`, or `--auto` to override that policy explicitly on +applicable desktop systems. An explicit `--base` request on Ubuntu Desktop +reports SKIP because the supported Ubuntu graphics configuration is the +Qualcomm overlay. + +KMSCube execution is bounded to 60 seconds by default. `--timeout SECONDS` +changes that limit. A timeout is reported as FAIL, and display-manager or Weston +state stopped by the suite is restored before exit. `-h` and `--help` print +usage and exit without changing package, GPU, display-manager, or Weston state. +Unknown arguments are reported as FAIL. #### Sample output: ``` diff --git a/Runner/suites/Multimedia/Graphics/KMSCube/run.sh b/Runner/suites/Multimedia/Graphics/KMSCube/run.sh index 83f42a766..e34f17e1f 100755 --- a/Runner/suites/Multimedia/Graphics/KMSCube/run.sh +++ b/Runner/suites/Multimedia/Graphics/KMSCube/run.sh @@ -3,23 +3,49 @@ # SPDX-License-Identifier: BSD-3-Clause # KMSCube Validator Script (Yocto-Compatible, POSIX sh) +# usage +# Print the supported KMSCube command-line options. usage() { cat <"$RES_FILE" + exit 0 + ;; +esac + FRAME_COUNT="${FRAME_COUNT:-999}" EXPECTED_MIN=$((FRAME_COUNT - 1)) @@ -124,20 +161,11 @@ KMSCUBE_DRM_DEV="" OS_ID="unknown" DISTRO_GPU_HANDLING_SUPPORTED=0 - -PACKAGE_TRANSITION_RC=0 -BOOT_ARTIFACT_RC=0 -GPU_BOOT_VALIDATE_RC=0 - -PACKAGE_SET_CHANGED=0 -GPU_BOOT_ARTIFACTS_CHANGED=0 +UBUNTU_GRAPHICS_VARIANT="" GPU_MODULE="msm_kgsl" GPU_OVERLAY_DEVICE="/dev/kgsl-3d0" GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-}" -GPU_KERNEL_PACKAGE="kgsl-dkms" -GPU_KERNEL_VERSION_BEFORE="" -GPU_KERNEL_VERSION_AFTER="" DISPLAY_MANAGER_SERVICE="${DISPLAY_MANAGER_SERVICE:-display-manager.service}" DISPLAY_MANAGER_STATE_FILE="/tmp/qcom-testkit-${TESTNAME}-display-manager.$$.state" @@ -192,25 +220,63 @@ if [ -z "$GPU_OVERLAY_GBM_PACKAGE" ]; then fi case "$OS_ID" in - debian|ubuntu|centos|rhel|fedora) + ubuntu) + DISTRO_GPU_HANDLING_SUPPORTED=1 + ;; + + debian|centos|rhel|fedora) DISTRO_GPU_HANDLING_SUPPORTED=1 ;; esac +if ! command -v display_resolve_graphics_mode >/dev/null 2>&1; then + log_fail "$TESTNAME FAIL - required graphics policy helper is unavailable: display_resolve_graphics_mode" + echo "$TESTNAME FAIL" >"$RES_FILE" + exit 0 +fi + +REQUESTED_GRAPHICS_MODE="$( + display_resolve_graphics_mode \ + "$OS_ID" \ + "$REQUESTED_GRAPHICS_MODE" +)" || { + log_fail "$TESTNAME FAIL - unable to resolve graphics mode for os=$OS_ID" + echo "$TESTNAME FAIL" >"$RES_FILE" + exit 0 +} + +if [ "$OS_ID" = "ubuntu" ]; then + if ! command -v display_detect_ubuntu_variant >/dev/null 2>&1; then + log_fail "$TESTNAME FAIL - required Ubuntu profile helper is unavailable: display_detect_ubuntu_variant" + echo "$TESTNAME FAIL" >"$RES_FILE" + exit 0 + fi + + UBUNTU_GRAPHICS_VARIANT="$(display_detect_ubuntu_variant)" + log_info "Ubuntu graphics profile, $UBUNTU_GRAPHICS_VARIANT" + + if [ "$UBUNTU_GRAPHICS_VARIANT" = "server" ]; then + log_skip "$TESTNAME SKIP - Ubuntu Server is headless, run this graphics test on Ubuntu Desktop with a connected DRM display" + echo "$TESTNAME SKIP" >"$RES_FILE" + exit 0 + fi + + if [ "$REQUESTED_GRAPHICS_MODE" = "base" ]; then + log_skip "$TESTNAME SKIP - Ubuntu Desktop supports the Qualcomm overlay graphics configuration, use the default mode or --overlay" + echo "$TESTNAME SKIP" >"$RES_FILE" + exit 0 + fi +fi + +log_info "Graphics mode, requested=$REQUESTED_GRAPHICS_MODE os=$OS_ID" + # --- Configure requested package and boot stack ------------------------------ # Yocto/qcom-distro images keep their native image-selected graphics stack. if [ "$DISTRO_GPU_HANDLING_SUPPORTED" -eq 1 ]; then for required_helper in \ - pkg_package_set_contains \ pkg_ensure_command \ - pkg_installed_package_version \ - pkg_ensure_required_package_set_present \ - pkg_ensure_optional_package_set_present \ - pkg_restore_package_set \ - pkg_package_has_file_matching \ - mrv_qcom_gpu_boot_mode \ - mrv_qcom_gpu_cleanup_kgsl_boot_artifacts \ - mrv_qcom_gpu_validate_boot_mode \ + display_prepare_desktop_graphics_stack \ + display_detect_build_flavour \ display_select_egl_vendor \ display_stop_service_for_drm \ display_restore_service_from_state; do @@ -221,173 +287,41 @@ if [ "$DISTRO_GPU_HANDLING_SUPPORTED" -eq 1 ]; then fi done - if [ "$OVERLAY_REQUESTED" -eq 1 ]; then - if ! pkg_package_set_contains graphics "$GPU_OVERLAY_GBM_PACKAGE"; then - log_fail "$TESTNAME FAIL - graphics package set is incomplete; missing $GPU_OVERLAY_GBM_PACKAGE" - echo "$TESTNAME FAIL" >"$RES_FILE" - exit 0 - fi - - GPU_KERNEL_VERSION_BEFORE="$( - pkg_installed_package_version \ - "$GPU_KERNEL_PACKAGE" 2>/dev/null || true - )" - - if ! pkg_ensure_optional_package_set_present \ - graphics \ - qli-staging \ - auto \ - "$@"; then - log_fail "$TESTNAME FAIL - failed to ensure Qualcomm graphics overlay package set" - echo "$TESTNAME FAIL" >"$RES_FILE" - exit 0 - fi + display_prepare_desktop_graphics_stack \ + "$TESTNAME" \ + "$REQUESTED_GRAPHICS_MODE" \ + "$GPU_MODULE" \ + "$GPU_OVERLAY_DEVICE" \ + "$GPU_OVERLAY_GBM_PACKAGE" + stack_rc=$? - GPU_KERNEL_VERSION_AFTER="$( - pkg_installed_package_version \ - "$GPU_KERNEL_PACKAGE" 2>/dev/null || true - )" - - if [ "$GPU_KERNEL_VERSION_BEFORE" != "$GPU_KERNEL_VERSION_AFTER" ]; then - log_info "Qualcomm graphics kernel package changed, package=$GPU_KERNEL_PACKAGE version=${GPU_KERNEL_VERSION_BEFORE:-not-installed}->${GPU_KERNEL_VERSION_AFTER:-not-installed}" - log_skip "$TESTNAME SKIP - Qualcomm overlay packages are ready, reboot required to activate KGSL" + case "$stack_rc" in + 0) + ;; + 2) echo "$TESTNAME SKIP" >"$RES_FILE" exit 0 - fi - - if ! pkg_package_has_file_matching \ - "$GPU_OVERLAY_GBM_PACKAGE" \ - '/gbm/msm_gbm[.]so$'; then - log_fail "$TESTNAME FAIL - Qualcomm GBM backend is unavailable from $GPU_OVERLAY_GBM_PACKAGE" - echo "$TESTNAME FAIL" >"$RES_FILE" - exit 0 - fi - - mrv_qcom_gpu_validate_boot_mode \ - kgsl \ - "$GPU_MODULE" \ - "$GPU_OVERLAY_DEVICE" \ - msm - GPU_BOOT_VALIDATE_RC=$? - - case "$GPU_BOOT_VALIDATE_RC" in - 0) - ;; - 2) - log_skip "$TESTNAME SKIP - Qualcomm overlay packages are ready, reboot required to activate KGSL" - echo "$TESTNAME SKIP" >"$RES_FILE" - exit 0 - ;; - *) - log_skip "$TESTNAME SKIP - unable to confirm a valid KGSL boot runtime" - echo "$TESTNAME SKIP" >"$RES_FILE" - exit 0 - ;; - esac - - if command -v ldconfig >/dev/null 2>&1 && ! ldconfig; then - log_fail "$TESTNAME FAIL - ldconfig failed after overlay package validation" - echo "$TESTNAME FAIL" >"$RES_FILE" - exit 0 - fi - - if ! display_select_egl_vendor adreno; then - log_fail "$TESTNAME FAIL - failed to select Qualcomm Adreno EGL vendor" + ;; + *) echo "$TESTNAME FAIL" >"$RES_FILE" exit 0 - fi - - log_pass "Qualcomm overlay packages, GBM backend, and KGSL boot runtime are ready" - else - PACKAGE_SET_CHANGED=0 - GPU_BOOT_ARTIFACTS_CHANGED=0 - - pkg_restore_package_set graphics - PACKAGE_TRANSITION_RC=$? - - case "$PACKAGE_TRANSITION_RC" in - 0) - # Qualcomm overlay package set was already absent. - PACKAGE_SET_CHANGED=0 - ;; - 2) - # Qualcomm overlay packages were removed successfully. - PACKAGE_SET_CHANGED=1 - ;; - *) - log_fail "$TESTNAME FAIL - failed to remove Qualcomm graphics overlay package set" - echo "$TESTNAME FAIL" >"$RES_FILE" - exit 0 - ;; - esac + ;; + esac - mrv_qcom_gpu_cleanup_kgsl_boot_artifacts - BOOT_ARTIFACT_RC=$? + if [ "$REQUESTED_GRAPHICS_MODE" = "auto" ]; then + display_detect_build_flavour - case "$BOOT_ARTIFACT_RC" in - 0) - # Stale KGSL boot artifacts were removed. The helper - # refreshed initramfs, so one reboot is required. - GPU_BOOT_ARTIFACTS_CHANGED=1 - ;; - 1) - # No stale KGSL boot artifacts were found. - GPU_BOOT_ARTIFACTS_CHANGED=0 - ;; - 2) - log_fail "$TESTNAME FAIL - failed to clean stale KGSL boot artifacts" + if [ "${DISPLAY_BUILD_FLAVOUR:-base}" = "overlay" ]; then + if ! display_select_egl_vendor adreno; then + log_fail "$TESTNAME FAIL - failed to select the detected Adreno EGL vendor" echo "$TESTNAME FAIL" >"$RES_FILE" exit 0 - ;; - *) - log_fail "$TESTNAME FAIL - unexpected KGSL boot-artifact cleanup result: rc=$BOOT_ARTIFACT_RC" - echo "$TESTNAME FAIL" >"$RES_FILE" - exit 0 - ;; - esac - - if ! pkg_ensure_required_package_set_present graphics-base; then - log_fail "$TESTNAME FAIL - failed to ensure upstream Mesa graphics package set" - echo "$TESTNAME FAIL" >"$RES_FILE" - exit 0 - fi - - if [ "$PACKAGE_SET_CHANGED" -eq 1 ] || - [ "$GPU_BOOT_ARTIFACTS_CHANGED" -eq 1 ]; then - log_skip "$TESTNAME SKIP - Qualcomm graphics packages or KGSL boot artifacts changed; reboot required to activate upstream MSM/freedreno" + fi + elif ! display_select_egl_vendor mesa; then + log_skip "$TESTNAME SKIP - detected base stack has no usable Mesa EGL vendor" echo "$TESTNAME SKIP" >"$RES_FILE" exit 0 fi - - mrv_qcom_gpu_validate_boot_mode \ - msm \ - "$GPU_MODULE" \ - "$GPU_OVERLAY_DEVICE" \ - msm - GPU_BOOT_VALIDATE_RC=$? - - case "$GPU_BOOT_VALIDATE_RC" in - 0) - ;; - 2) - log_skip "$TESTNAME SKIP - current boot still uses KGSL; reboot required to restore upstream MSM/freedreno ownership" - echo "$TESTNAME SKIP" >"$RES_FILE" - exit 0 - ;; - *) - log_skip "$TESTNAME SKIP - unable to confirm upstream MSM/freedreno ownership" - echo "$TESTNAME SKIP" >"$RES_FILE" - exit 0 - ;; - esac - - if ! display_select_egl_vendor mesa; then - log_skip "$TESTNAME SKIP - Mesa EGL vendor is unavailable" - echo "$TESTNAME SKIP" >"$RES_FILE" - exit 0 - fi - - log_pass "Upstream MSM/freedreno packages and boot runtime are ready" fi else log_info "Graphics package-stack and GPU boot-mode handling skipped for os=$OS_ID" @@ -463,29 +397,29 @@ if command -v display_select_primary_connector >/dev/null 2>&1; then log_warn "display_select_primary_connector returned empty output" else KMSCUBE_DRM_CONNECTOR="" - log_warn "display_select_primary_connector failed; connected display mapping may be unavailable" + log_warn "display_select_primary_connector failed, connected display mapping may be unavailable" fi else - log_warn "display_select_primary_connector helper not found; connected display mapping may be unavailable" + log_warn "display_select_primary_connector helper not found, connected display mapping may be unavailable" fi if command -v display_select_primary_drm_device >/dev/null 2>&1; then if KMSCUBE_DRM_DEV="$(display_select_primary_drm_device)"; then [ -n "$KMSCUBE_DRM_DEV" ] || - log_warn "display_select_primary_drm_device returned empty output; kmscube will use default DRM device selection" + log_warn "display_select_primary_drm_device returned empty output, kmscube will use default DRM device selection" else KMSCUBE_DRM_DEV="" - log_warn "display_select_primary_drm_device failed; kmscube will use default DRM device selection" + log_warn "display_select_primary_drm_device failed, kmscube will use default DRM device selection" fi else - log_warn "display_select_primary_drm_device helper not found; kmscube will use default DRM device selection" + log_warn "display_select_primary_drm_device helper not found, kmscube will use default DRM device selection" fi if [ -n "$KMSCUBE_DRM_DEV" ]; then log_info "Selected KMS connector: ${KMSCUBE_DRM_CONNECTOR:-}" log_info "Selected KMS DRM device: $KMSCUBE_DRM_DEV" else - log_warn "Could not map connected display to a DRM card; kmscube will use default device selection" + log_warn "Could not map connected display to a DRM card, kmscube will use default device selection" fi # --- Basic DRM availability guard ------------------------------------------- @@ -525,6 +459,12 @@ fi KMSCUBE_BIN="$(command -v kmscube 2>/dev/null || true)" log_info "Using kmscube: ${KMSCUBE_BIN:-}" +if ! command -v run_with_managed_timeout >/dev/null 2>&1; then + log_fail "$TESTNAME FAIL - required timeout helper is unavailable: run_with_managed_timeout" + echo "$TESTNAME FAIL" >"$RES_FILE" + exit 0 +fi + # --- GPU acceleration gating ------------------------------------------------- if command -v display_is_cpu_renderer >/dev/null 2>&1; then if display_is_cpu_renderer gbm >/dev/null 2>&1; then @@ -543,7 +483,7 @@ if command -v display_is_cpu_renderer >/dev/null 2>&1; then fi fi else - log_warn "display_is_cpu_renderer helper not found; continuing without GPU acceleration gating" + log_warn "display_is_cpu_renderer helper not found, continuing without GPU acceleration gating" fi # --- Release DRM master ------------------------------------------------------ @@ -562,7 +502,7 @@ if weston_is_running; then fi if weston_is_running; then - log_warn "Weston remains running; kmscube may fail to acquire DRM master" + log_warn "Weston remains running, kmscube may fail to acquire DRM master" fi case "$OS_ID" in @@ -590,16 +530,24 @@ export EGL_PLATFORM=gbm rc=0 if [ -n "$KMSCUBE_DRM_DEV" ]; then - log_info "Running kmscube on $KMSCUBE_DRM_DEV with --count=${FRAME_COUNT} ..." + log_info "Running kmscube on $KMSCUBE_DRM_DEV with --count=${FRAME_COUNT}, timeout=${KMSCUBE_TIMEOUT}s" - "$KMSCUBE_BIN" \ + run_with_managed_timeout \ + "$KMSCUBE_TIMEOUT" \ + /tmp \ + kmscube \ + "$KMSCUBE_BIN" \ -D "$KMSCUBE_DRM_DEV" \ --count="${FRAME_COUNT}" >"$LOG_FILE" 2>&1 rc=$? else - log_info "Running kmscube with default DRM device selection and --count=${FRAME_COUNT} ..." + log_info "Running kmscube with default DRM device selection and --count=${FRAME_COUNT}, timeout=${KMSCUBE_TIMEOUT}s" - "$KMSCUBE_BIN" \ + run_with_managed_timeout \ + "$KMSCUBE_TIMEOUT" \ + /tmp \ + kmscube \ + "$KMSCUBE_BIN" \ --count="${FRAME_COUNT}" >"$LOG_FILE" 2>&1 rc=$? fi @@ -610,6 +558,25 @@ else unset EGL_PLATFORM fi +if [ "$rc" -eq 124 ]; then + log_fail "$TESTNAME : Execution timed out after ${KMSCUBE_TIMEOUT}s - see $LOG_FILE" + cat "$LOG_FILE" + echo "$TESTNAME FAIL" >"$RES_FILE" + + if [ "$weston_stopped_by_test" -eq 1 ]; then + log_info "Restoring Weston after timeout" + + if weston_restore_runtime 15; then + weston_stopped_by_test=0 + else + log_error "Failed to restore Weston runtime after $TESTNAME timeout" + fi + fi + + display_restore_service_from_state "$DISPLAY_MANAGER_STATE_FILE" || true + exit 1 +fi + # Treat explicit error and failure words from kmscube as authoritative even # when the process exits successfully. Ignore common zero-failure summaries. awk ' diff --git a/Runner/suites/Multimedia/Graphics/weston-simple-egl/README_weston-simple-egl.md b/Runner/suites/Multimedia/Graphics/weston-simple-egl/README_weston-simple-egl.md index 6700ac849..e0081d8d0 100755 --- a/Runner/suites/Multimedia/Graphics/weston-simple-egl/README_weston-simple-egl.md +++ b/Runner/suites/Multimedia/Graphics/weston-simple-egl/README_weston-simple-egl.md @@ -23,6 +23,15 @@ Yocto images must provide the required client and Weston runtime. Debian and Ubu ## Desktop distribution modes +- Ubuntu Desktop defaults to `--overlay`, so a plain `./run.sh` validates the + Qualcomm KGSL/Adreno stack without requiring an explicit mode argument. +- Ubuntu Server is treated as headless and reports SKIP before graphics package + or display-runtime preparation. Run the suite on Ubuntu Desktop to validate + graphics. +- An explicit `--base` request on Ubuntu Desktop reports SKIP because the + supported Ubuntu graphics configuration is the Qualcomm overlay. +- Debian, CentOS, RHEL, and Fedora default to `--base` for compatibility with + their selectable base and overlay package flows. - `./run.sh --base` selects the upstream MSM/freedreno stack and ensures the OS-specific Mesa package set. - `./run.sh --overlay` selects the Qualcomm KGSL/Adreno stack. A ready runtime is reused without package changes. Otherwise, the focused EGL/GLES package set is recovered and DKMS changes can require a reboot before validation continues. - Debian uses the `adreno-*` packages from `qli-staging`. Ubuntu uses the `qcom-adreno-*` packages and existing image APT sources, never Debian `qli` or `qli-staging`. CentOS uses the `adreno-*` RPMs from the configured Qualcomm RPM repositories. diff --git a/Runner/suites/Multimedia/Graphics/weston-simple-egl/run.sh b/Runner/suites/Multimedia/Graphics/weston-simple-egl/run.sh index 04f7765bb..5b58a94aa 100755 --- a/Runner/suites/Multimedia/Graphics/weston-simple-egl/run.sh +++ b/Runner/suites/Multimedia/Graphics/weston-simple-egl/run.sh @@ -5,7 +5,9 @@ # Validate weston-simple-egl through a usable Weston compositor. # # Desktop distributions: -# - default to the upstream MSM/freedreno base stack +# - Ubuntu Desktop defaults to the Qualcomm KGSL/Adreno stack +# - Ubuntu Server is headless and skips as not applicable +# - Debian, CentOS, RHEL, and Fedora default to upstream MSM/freedreno # - --overlay selects the Qualcomm KGSL/Adreno package and boot stack # - --auto validates the currently selected stack without changing it # - use the unsynchronized client benchmark with a 60 FPS functional target in @@ -47,7 +49,9 @@ if [ -z "${__INIT_ENV_LOADED:-}" ]; then __INIT_ENV_LOADED=1 fi -# shellcheck disable=SC1090,SC1091 +# shellcheck disable=SC1090 +. "$INIT_ENV" +# shellcheck disable=SC1091 . "$TOOLS/functestlib.sh" # shellcheck disable=SC1090,SC1091 . "$TOOLS/lib_display.sh" @@ -63,6 +67,7 @@ if [ -r "$TOOLS/lib_module_reload.sh" ]; then fi TESTNAME="weston-simple-egl" +RES_FILE="$SCRIPT_DIR/${TESTNAME}.res" DURATION="${DURATION:-30s}" STOP_GRACE="${STOP_GRACE:-3s}" @@ -86,6 +91,7 @@ GPU_OVERLAY_GBM_PACKAGE="${GPU_OVERLAY_GBM_PACKAGE:-}" OS_ID="unknown" DISTRO_GPU_HANDLING_SUPPORTED=0 +UBUNTU_GRAPHICS_VARIANT="" APP_PID="" while [ "$#" -gt 0 ]; do @@ -246,13 +252,12 @@ test_path="$(find_test_case_by_name "$TESTNAME" 2>/dev/null || true)" if [ -z "$test_path" ] || [ ! -d "$test_path" ]; then log_fail "$TESTNAME FAIL - test directory not found" - echo "$TESTNAME FAIL" >"./${TESTNAME}.res" + echo "$TESTNAME FAIL" >"$RES_FILE" exit 1 fi cd "$test_path" || exit 1 -RES_FILE="./${TESTNAME}.res" RUN_LOG="./${TESTNAME}_run.log" : >"$RES_FILE" @@ -307,22 +312,54 @@ if [ -z "$GPU_OVERLAY_GBM_PACKAGE" ]; then fi case "$OS_ID" in - debian|ubuntu|centos|rhel|fedora) + ubuntu) DISTRO_GPU_HANDLING_SUPPORTED=1 - - if [ "$REQUESTED_GRAPHICS_MODE" = "default" ]; then - REQUESTED_GRAPHICS_MODE="base" - fi - ;; - *) - if [ "$REQUESTED_GRAPHICS_MODE" = "default" ]; then - REQUESTED_GRAPHICS_MODE="auto" - fi + debian|centos|rhel|fedora) + DISTRO_GPU_HANDLING_SUPPORTED=1 ;; esac +if ! command -v display_resolve_graphics_mode >/dev/null 2>&1; then + log_fail "$TESTNAME FAIL - required graphics policy helper is unavailable: display_resolve_graphics_mode" + echo "$TESTNAME FAIL" >"$RES_FILE" + exit 0 +fi + +REQUESTED_GRAPHICS_MODE="$( + display_resolve_graphics_mode \ + "$OS_ID" \ + "$REQUESTED_GRAPHICS_MODE" +)" || { + log_fail "$TESTNAME FAIL - unable to resolve graphics mode for os=$OS_ID" + echo "$TESTNAME FAIL" >"$RES_FILE" + exit 0 +} + +if [ "$OS_ID" = "ubuntu" ]; then + if ! command -v display_detect_ubuntu_variant >/dev/null 2>&1; then + log_fail "$TESTNAME FAIL - required Ubuntu profile helper is unavailable: display_detect_ubuntu_variant" + echo "$TESTNAME FAIL" >"$RES_FILE" + exit 0 + fi + + UBUNTU_GRAPHICS_VARIANT="$(display_detect_ubuntu_variant)" + log_info "Ubuntu graphics profile, $UBUNTU_GRAPHICS_VARIANT" + + if [ "$UBUNTU_GRAPHICS_VARIANT" = "server" ]; then + log_skip "$TESTNAME SKIP - Ubuntu Server is headless, run this graphics test on Ubuntu Desktop with a graphical target and display manager" + echo "$TESTNAME SKIP" >"$RES_FILE" + exit 0 + fi + + if [ "$REQUESTED_GRAPHICS_MODE" = "base" ]; then + log_skip "$TESTNAME SKIP - Ubuntu Desktop supports the Qualcomm overlay graphics configuration, use the default mode or --overlay" + echo "$TESTNAME SKIP" >"$RES_FILE" + exit 0 + fi +fi + log_info "Weston log directory, $SCRIPT_DIR" log_info "--------------------------------------------------------------------------" log_info "------------------- Starting ${TESTNAME} Testcase --------------------------" @@ -765,7 +802,7 @@ fi log_info "Client finished, rc=${rc} elapsed=${elapsed}s" if [ "$clock_stepped" -eq 1 ]; then - log_warn "System clock stepped by ${clock_step}s during the run; FPS samples from the client are not trustworthy" + log_warn "System clock stepped by ${clock_step}s during the run, FPS samples from the client are not trustworthy" fi fps_count=0 diff --git a/Runner/utils/audio_common.sh b/Runner/utils/audio_common.sh index 67c9fbbab..e31044595 100755 --- a/Runner/utils/audio_common.sh +++ b/Runner/utils/audio_common.sh @@ -96,16 +96,38 @@ resolve_clip() { # audio_ensure_download_client # Ensures that curl or wget is available. Takes no arguments and emits no -# machine-readable stdout. Returns 0 when an image-provided downloader is -# available and 1 otherwise. Runtime package installation is intentionally not -# attempted by an audio test. +# machine-readable stdout. It may install the complete mapped audio-download +# package set on Ubuntu and writes diagnostics through log_* helpers. Returns 0 +# when a downloader is available and 1 otherwise. audio_ensure_download_client() { if command -v curl >/dev/null 2>&1 || command -v wget >/dev/null 2>&1; then return 0 fi - log_error "No image-provided downloader is available, provision curl or wget" + if command -v pkg_ensure_host_distro_package_set_present >/dev/null 2>&1; then + log_info "Audio asset download requires curl or wget, attempting mapped package recovery" + pkg_ensure_host_distro_package_set_present audio-download + audio_download_recovery_rc=$? + + case "$audio_download_recovery_rc" in + 0) + ;; + 2) + log_warn "Audio downloader package recovery is not configured for this operating system" + ;; + *) + log_error "Failed to recover the audio-download package set" + ;; + esac + fi + + if command -v curl >/dev/null 2>&1 || + command -v wget >/dev/null 2>&1; then + return 0 + fi + + log_error "No downloader is available, provision curl and wget in the image or enable Ubuntu package recovery" return 1 } @@ -162,9 +184,9 @@ audio_has_runnable_discovery_clips() { # audio_fetch_assets_from_url # Downloads and extracts the audio archive URL into AUDIO_CLIPS_BASE_DIR. The # URL must be non-empty. The function writes diagnostic logs and temporary -# archive files, uses only image-provided download clients, and emits no -# machine-readable stdout. Returns 0 when runnable clips are ready and 1 when -# download, extraction, or validation fails. +# archive files, may recover the mapped Ubuntu downloader package set, and +# emits no machine-readable stdout. Returns 0 when runnable clips are ready and +# 1 when download, extraction, or validation fails. audio_fetch_assets_from_url() { url="$1" clips_dir="${AUDIO_CLIPS_BASE_DIR:-AudioClips}" @@ -5174,6 +5196,7 @@ 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 +# Ubuntu overlay - not enabled, report not applicable without package work # CentOS base - defer client recovery until backend selection # CentOS overlay - ensure the documented Qualcomm AudioReach RPM set # other distros - no-op until their package mappings are verified @@ -5186,6 +5209,7 @@ audio_prepare_audioreach_udev_rule() { # 0 - ready or not applicable # 1 - package preparation failed # 2 - AudioReach DKMS package changed; reboot required +# 3 - requested AudioReach overlay is not enabled on this distribution audio_prepare_test_packages() { atp_overlay_requested="${1:-0}" @@ -5238,6 +5262,13 @@ audio_prepare_test_packages() { return 0 ;; esac + + if [ "$atp_os_id" = "ubuntu" ] && + [ "$atp_overlay_requested" -eq 1 ]; then + log_info "Ubuntu AudioReach overlay is not enabled" + log_info "Run without --overlay to validate the Ubuntu base Audio stack" + return 3 + fi # Host-distribution package preparation must run from root orchestration. if [ "$(id -u 2>/dev/null || echo 1)" -ne 0 ]; then @@ -5355,11 +5386,13 @@ audio_prepare_test_packages() { atp_plugin_package="audioreach-pipewire-plugin" atp_dkms_package="audioreach-dkms" atp_support_package="audioreach-pal" + atp_overlay_source="auto" ;; *) atp_plugin_package="audioreach-pipewire-plugin" - atp_dkms_package="audioreach-kernel-dkms" - atp_support_package="audioreach-config" + atp_dkms_package="audioreach-dkms" + atp_support_package="audioreach-conf" + atp_overlay_source="qli-staging" ;; esac @@ -5389,7 +5422,7 @@ audio_prepare_test_packages() { # treat the request as base mode. if ! pkg_ensure_optional_package_set_present \ audio \ - qli-staging \ + "$atp_overlay_source" \ auto \ --overlay \ "$@"; then diff --git a/Runner/utils/lib_display.sh b/Runner/utils/lib_display.sh index df84a9ed8..ca7b3f9b2 100755 --- a/Runner/utils/lib_display.sh +++ b/Runner/utils/lib_display.sh @@ -17,6 +17,92 @@ EGLI_LAST_GL_RENDERER="" EGLI_LAST_PIPE_KIND="" EGLI_LAST_OUT="" +# display_detect_ubuntu_variant +# Classify an Ubuntu image as desktop or server from immutable OS metadata, +# installed desktop meta-packages, and systemd display-target evidence. Output +# is exactly "desktop" or "server" on stdout. Returns 0. +display_detect_ubuntu_variant() { + display_duv_variant_id="$( + sed -n 's/^VARIANT_ID=//p' /etc/os-release 2>/dev/null | + sed -n '1p' | + sed 's/^"//;s/"$//' | + tr '[:upper:]' '[:lower:]' + )" + + case "$display_duv_variant_id" in + *desktop*) + printf '%s\n' "desktop" + return 0 + ;; + *server*|minimal|core) + printf '%s\n' "server" + return 0 + ;; + esac + + if command -v dpkg-query >/dev/null 2>&1; then + for display_duv_package in \ + ubuntu-desktop \ + ubuntu-desktop-minimal \ + ubuntu-desktop-raspi + do + if dpkg-query -W -f='${Status}\n' "$display_duv_package" 2>/dev/null | + grep -q '^install ok installed$'; then + printf '%s\n' "desktop" + return 0 + fi + done + fi + + if [ -s /etc/X11/default-display-manager ]; then + printf '%s\n' "desktop" + return 0 + fi + + if command -v systemctl >/dev/null 2>&1 && + systemctl is-active --quiet display-manager.service 2>/dev/null; then + printf '%s\n' "desktop" + return 0 + fi + + printf '%s\n' "server" + return 0 +} + +# display_resolve_graphics_mode +# Resolve the internal default mode without changing explicit base, overlay, or +# auto requests. Output is one mode on stdout. Returns 1 for invalid input. +display_resolve_graphics_mode() { + display_rgm_os_id="${1:-unknown}" + display_rgm_requested="${2:-default}" + + case "$display_rgm_requested" in + base|overlay|auto) + printf '%s\n' "$display_rgm_requested" + return 0 + ;; + default) + ;; + *) + return 1 + ;; + esac + + case "$display_rgm_os_id" in + ubuntu) + printf '%s\n' "overlay" + ;; + debian|centos|rhel|fedora) + printf '%s\n' "base" + ;; + *) + printf '%s\n' "auto" + ;; + esac + + return 0 +} + debugfs_is_mounted() { awk '$3=="debugfs" && $2=="/sys/kernel/debug" {found=1} END{exit(found?0:1)}' /proc/mounts 2>/dev/null } diff --git a/Runner/utils/lib_pkg_provider.sh b/Runner/utils/lib_pkg_provider.sh index c8ba418c1..52ee8a7f3 100755 --- a/Runner/utils/lib_pkg_provider.sh +++ b/Runner/utils/lib_pkg_provider.sh @@ -2601,6 +2601,9 @@ pkg_ensure_host_distro_package_set_present() { } # Avoid package-manager/network work when an optional package set is complete. +# When an APT-backed optional set is incomplete, invalidate the shared update +# marker so newly provisioned *.sources artifacts are installed and their +# package indexes are downloaded before recovery is attempted. pkg_ensure_optional_package_set_present() { peops_set="$1" peops_source="$2" @@ -2615,6 +2618,15 @@ pkg_ensure_optional_package_set_present() { return 0 fi + peops_provider="$(pkg_active_provider)" + + if [ "$peops_provider" = "apt" ]; then + peops_update_mark="${PKG_APT_UPDATED_MARK:-/tmp/qcom_testkit_apt_updated}" + rm -f "$peops_update_mark" 2>/dev/null || true + pkg_log_info "Optional APT package set is incomplete, refreshing source artifacts and package indexes" + pkg_log_info "Optional APT refresh target, set=$peops_set" + fi + if ! command -v pkg_ensure_optional_package_set >/dev/null 2>&1; then log_error "Optional package-set helper is unavailable" return 1