Enhance fastrpc_test for multi-domain and multi-PD execution#406
Enhance fastrpc_test for multi-domain and multi-PD execution#406anankulk wants to merge 3 commits intoqualcomm-linux:mainfrom
Conversation
Enhance fastrpc_test to discover and test all supported DSP domains at runtime instead of hardcoding a single domain. Changes: - Runtime domain discovery via dt_has_remoteproc_fw() - Support for CDSP1, GPDSP0, GPDSP1 in addition to existing domains - Domain-aware PD execution (ADSP/MDSP/SDSP: signed only; CDSP/GPDSP: both signed and unsigned) - Tabular summary showing per-domain, per-PD test results Default behavior now tests all discovered domains with appropriate PD modes. Single-domain execution still supported via --domain-mode option. Signed-off-by: Anand Kulkarni <anankulk@qti.qualcomm.com>
There was a problem hiding this comment.
- changed defaults are not truly backward compatible
- YAML wrapper in the changed hunk still uses the older masked pattern
- the new no-domain skip path exits 1 after writing SKIP
Please address the workflow issues - https://github.com/qualcomm-linux/qcom-linux-testkit/actions/runs/24520486149/job/71764753535?pr=406
| CLI_DOMAIN="" | ||
| CLI_DOMAIN_NAME="" | ||
| DOMAIN_MODE="all-supported" # ENHANCED: default to all-supported | ||
| PD_MODE="both" # ENHANCED: default to both PDs |
There was a problem hiding this comment.
Same recommendation as for the YAML: either preserve old defaults here, or explicitly document that the default execution model is changing.
There was a problem hiding this comment.
Addressed by documenting the default execution model change in run.sh usage function with "Enhanced Test Coverage" section and domain selection priority explanation.
| if [ -z "$DOMAINS_TO_TEST" ]; then | ||
| log_skip "$TESTNAME SKIP - no mapped/supported domains detected" | ||
| echo "$TESTNAME : SKIP" >"$RESULT_FILE" | ||
| exit 1 |
There was a problem hiding this comment.
After writing SKIP, exit 0
There was a problem hiding this comment.
Addressed by changing all SKIP conditions to exit 0 instead of exit 1
Extend fastrpc_test to dynamically discover and validate all supported DSP domains at runtime, beyond legacy single-domain execution. Changes: - Discover available DSP domains via dt_has_remoteproc_fw() - Add support for CDSP1, GPDSP0, and GPDSP1 (domains 4, 5, 6) - Enforce domain-specific PD modes: - ADSP/MDSP/SDSP: signed PD only - CDSP/CDSP1/GPDSP: signed and unsigned PD - Track pass/fail results per domain and PD during execution - Print a per-domain, per-PD summary table Behavior: - Default: test all discovered domains with supported PD modes - Legacy: --domain-mode single --domain <N> v2: - Fix SKIP paths to exit 0 - Remove unused pick_default_domain() - Track counters during execution - Fix ShellCheck warnings and formatting issues Signed-off-by: Anand Kulkarni <anankulk@qti.qualcomm.com>
smuppand
left a comment
There was a problem hiding this comment.
Could you please test this in Lava and share the jobs as a reference once the changes are applied?
@bhargav0610 @qcom-anilyada The current run.sh script modifies the default behavior, and fastrpc is designed to change it intentionally. Please take note of this.
| - USER_PD_PARAM="" | ||
| - if [ "${USER_PD}" != 0 ]; then USER_PD_PARAM="--user-pd"; fi | ||
| - ./run.sh --arch "${ARCH}" --bin-dir "${BIN_DIR}" --domain "${DOMAIN}" --domain-name "${DOMAIN_NAME}" --repeat "${REPEAT}" --timeout "${TIMEOUT}" $USER_PD_PARAM || true | ||
| - if [ -n "${USER_PD}" ] && [ "${USER_PD}" != 0 ]; then USER_PD_PARAM="--user-pd"; fi |
There was a problem hiding this comment.
I ran this in LAVA https://lava.infra.foundries.io/scheduler/job/183447#L2522 on RB3Gen2.
What I see is:
- remoteproc logging shows both ADSP and CDSP
- but
Domains to teststill resolves to only0 - and only ADSP signed runs
So this validates that the legacy ADSP flow still works, but it does not actually validate the new multi-domain default behavior.
There was a problem hiding this comment.
Thanks for the LAVA job execution.
Checking the logs shared.
2bdb2cd to
7797d7e
Compare
Enhance domain discovery to work across all mainline SoCs and rename USER_PD parameter for clarity. Changes: - Use helper-backed remoteproc discovery for all-supported mode - Parse runtime remoteproc names from get_remoteproc_by_firmware() results - Keep DT-based detection as fallback when no runtime entry exists - Canonicalize firmware names (cdsp0→cdsp, gdsp0→gpdsp0, gdsp1→gpdsp1) - Add human-readable domain name logging (e.g. "ADSP,CDSP,CDSP1") - Rename USER_PD → UNSIGNED_PD (YAML params, run.sh flags, env vars) - Avoid pipe-based summary parsing in POSIX sh - Fix missing CDSP in all-supported mode - Keep FAIL exit code as 0 because LAVA consumes the .res file Signed-off-by: Anand Kulkarni <anankulk@qti.qualcomm.com>
7797d7e to
43a4100
Compare
Summary
This PR enhances fastrpc_test by expanding test coverage from a single DSP domain to
runtime discovery and validation of all supported DSP domains.
The change improves coverage on platforms with multiple DSPs while
preserving compatibility with legacy single-domain execution.
Changes
Runtime DSP domain discovery
Expanded domain support
Domain-aware PD execution
Result tracking and reporting
Behavior
Default behavior
Legacy behavior
--domain-mode single --domain
Maintenance
Expected Sample Output : (qcs9100-ride-sx)
