Skip to content

fastrpc-test: Add runtime validation and remove SoC-based filtering - #532

Open
anankulk wants to merge 1 commit into
qualcomm-linux:mainfrom
anankulk:enable_glymur_rb1
Open

fastrpc-test: Add runtime validation and remove SoC-based filtering#532
anankulk wants to merge 1 commit into
qualcomm-linux:mainfrom
anankulk:enable_glymur_rb1

Conversation

@anankulk

@anankulk anankulk commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace hardcoded SoC-level filtering with runtime validation to enable
FastRPC testing on QRB2210 and Glymur CRD.

  • SoC filtering removed: the hardcoded skip for QRB2210/Glymur CRD and the
    per-SoC GPDSP0/GPDSP1 blacklist (QCS9075, QCS8275, QCS8300, QCS9100) are
    replaced entirely by runtime domain discovery via DT/remoteproc
  • Artifact gates: execution is gated on FastRPC system libraries
    (libadsprpc/libcdsprpc/libsdsprpc), DSP skeletons (v75/v68), and
    test libraries (libcalculator/libhap_example/libmultithreading) being
    present; missing artifacts produce a clean SKIP instead of a runtime failure;
    test library detection uses glob matching to handle versioned Debian installs
  • Endpoint detection: domain_to_endpoint_label() maps domain numbers to
    their DT binding labels (GPDSP0/1 → gdsp0/gdsp1);
    fastrpc_domain_endpoint_available() checks both /dev/fastrpc-<label> and
    /dev/fastrpc-<label>-secure so secure-only domains are not incorrectly filtered
  • Failure semantics: explicitly selected domains (--domain / --domain-name
    / single mode) with no usable endpoint produce FAIL with remoteproc diagnostics;
    auto-discovered domains with a missing endpoint emit a warning visible without
    --verbose and dump remoteproc state before the all-domain SKIP
  • Cleanup: only_hap_example_failed() and the SM8850 libhap_example
    exception are removed so results are reported consistently across all targets

Files changed

  • Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh
  • Runner/utils/lib_fastrpc.sh
  • Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only_hap_example_failed() now has no callers and still documents the SM8850 exception being removed. Remove the function and obsolete comment in this PR.

Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh
# Do not skip Glymur CRD by SoC name. Newer Glymur/Debian images expose
# ADSP/CDSP remoteproc instances and FastRPC skeletons, so runtime discovery
# should decide whether the test can run.
soc_skip_all=0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soc_skip_all is initialized to 0 but can no longer become 1.Remove soc_skip_all and its block at lines 251–255 rename the section to describe the remaining GPDSP filter.

@anankulk

Copy link
Copy Markdown
Contributor Author

Hi Srikanth Muppandam (@smuppand),

With the upcoming tag to be released for fastrpc recipe : we are enabling gpdsp test support as-well.
Once the tag is released, will address the comments and enable gdsp as-well along with the on-going changes.

@anankulk anankulk changed the title fastrpc-test :enable tests on QRB2210, Glymur CRD, and SM8850 fastrpc-test :fastrpc-test: Add runtime validation and remove SoC-based filtering Aug 27, 2026
@anankulk anankulk changed the title fastrpc-test :fastrpc-test: Add runtime validation and remove SoC-based filtering fastrpc-test: Add runtime validation and remove SoC-based filtering Aug 27, 2026

@smuppand Srikanth Muppandam (smuppand) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With these new changes, you have to fix the following code as well.

Runner/utils/lib_fastrpc.sh:151 — artifact discovery validates generic directories, not FastRPC artifacts

  • Issue: FASTRPC_RESOLVED_LIB_SYS_DIR becomes /usr/lib whenever that directory exists. Likewise, the runner checks FASTRPC_RESOLVED_SKEL_BASE,
    although the base can exist without either v75 or v68. FASTRPC_RESOLVED_LIB_TEST_DIR is discovered but never required.

  • Recommended fix: Resolve and validate the actual required library files, require a non-empty FASTRPC_RESOLVED_SKEL_PATH, and validate the required
    test-library artifacts rather than generic directories.

Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test.yaml:11 — YAML still documents removed GPDSP filtering

  • Issue: The description says GPDSP domains are skipped on QCS9075/QCS8275/QCS8300/QCS9100, while the PR removes that blacklist.
  • Recommended fix: Describe runtime domain and endpoint discovery instead.

Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh:188 — remove unused SOC_MACHINE

  • Recommended fix: Remove the assignment.

Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh Outdated
Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh Outdated
Comment thread Runner/utils/lib_fastrpc.sh
Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh Outdated
Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh
Replace hardcoded SoC/GPDSP skips with runtime discovery. Add artifact
gates for system libs, DSP skeletons, and test libraries; fix endpoint
helpers for GPDSP DT labels and -secure variants. Remove
only_hap_example_failed() SM8850 exception.

Signed-off-by: Anand Kulkarni <anankulk@qti.qualcomm.com>
if [ "$fastrpc_chardev_iface" -eq 1 ]; then
log_info "FastRPC interface: character device (/dev/fastrpc-*)"
else
log_info "FastRPC interface: non-chardev (QDA DRM or similar); skipping endpoint filter"

@smuppand Srikanth Muppandam (smuppand) Sep 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The absence of every /dev/fastrpc-* node is treated as proof of a supported “QDA DRM or similar” interface, but no alternate FastRPC interface is positively detected or validated. A normal broken image with remoteproc entries but no FastRPC endpoint therefore bypasses endpoint validation and runs the full matrix.

Explicit --domain selection also executes instead of producing the FAIL promised by the YAML.

Add positive detection and validation for each supported non-character-device interface. If none is detected, preserve the existing policy: FAIL for an explicitly selected domain and SKIP for auto-discovered unavailable hardware.

candidate_dirs="$1"
for candidate_dir in $candidate_dirs; do
[ -d "$candidate_dir" ] || continue
for lib in libadsprpc libcdsprpc libsdsprpc; do

@smuppand Srikanth Muppandam (smuppand) Sep 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns success after finding any one of libadsprpc, libcdsprpc, or libsdsprpc. The suite can consequently schedule a domain whose required runtime library is missing and convert an expected missing-capability SKIP into an expensive runtime failure. Build a complete artifact inventory and validate the library requirements of every selected domain, or require the complete set if fastrpc_test always exercises all of them. Log the exact missing artifacts.

candidate_dirs="$1"
for candidate_dir in $candidate_dirs; do
[ -d "$candidate_dir" ] || continue
for lib in libcalculator libhap_example libmultithreading; do

@smuppand Srikanth Muppandam (smuppand) Sep 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same partial-success problem exists for test libraries: finding one library allows execution even if other tests require libcalculator, libhap_example, or libmultithreading. Validate the exact library set used by the selected test mode. Return the missing names so the runner can classify the domain cleanly instead of discovering the problem after starting fastrpc_test.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anankulk Please address the pending comments too

exit 0
fi

if [ -z "${FASTRPC_RESOLVED_SKEL_PATH:-}" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gate relies on FASTRPC_RESOLVED_SKEL_PATH, which currently accepts existing v75 or v68 directories without verifying the required skeleton files. It also false-SKIPs future layouts such as a new architecture-version directory.

Discover directories containing usable skeleton artifacts, or model the required skeleton variants in the domain capability metadata. Do not treat an empty version directory as a valid artifact set.

PD_MODE: "both" # both|signed-only|unsigned-only (default: both - tests both PDs where supported)
UNSIGNED_PD: "" # If set to non-zero, runs only unsigned PD mode (-U 1)
REPEAT: 1 # Number of repetitions (default: 1)
TIMEOUT: "" # Timeout for each run (no timeout if omitted)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR removes filters and can add multiple domains and PD combinations, but the default still runs every invocation without a timeout. One wedged DSP can therefore consume the complete CI action timeout. Provide a finite per-invocation default, require a working bounded-timeout implementation, and log the calculated worst-case matrix duration.

# Maps a domain number to the DT binding label used by the FastRPC driver
# when naming /dev/fastrpc-<label>. GPDSP domains use the DT label gdsp0/gdsp1,
# not the presentation names gpdsp0/gpdsp1.
domain_to_endpoint_label() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This endpoint mapping introduces another independently maintained domain switch. Domain IDs and aliases are now duplicated across name_to_domain(), domain_to_name(), domain_to_endpoint_label(), discover_supported_domains(), domain validation, and domain_supported_pds(). Adding domain 7 requires coordinated edits in several places and can silently produce inconsistent capability decisions. Define one domain capability table containing ID, aliases, firmware labels, endpoint label, supported PDs, required artifacts, and interface types, then have discovery and scheduling consume that table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants