Skip to content

Enhance fastrpc_test for multi-domain and multi-PD execution#406

Open
anankulk wants to merge 2 commits intoqualcomm-linux:mainfrom
anankulk:fastrpc-multi-domain-test
Open

Enhance fastrpc_test for multi-domain and multi-PD execution#406
anankulk wants to merge 2 commits intoqualcomm-linux:mainfrom
anankulk:fastrpc-multi-domain-test

Conversation

@anankulk
Copy link
Copy Markdown

@anankulk anankulk commented Apr 16, 2026

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

  • Discover available DSP domains at runtime using dt_has_remoteproc_fw()
  • Remove reliance on a fixed default domain

Expanded domain support

  • Add support for CDSP1, GPDSP0, and GPDSP1
  • Covers domains 4, 5, and 6

Domain-aware PD execution

  • Enforce PD execution rules based on domain capabilities:
    • ADSP / MDSP / SDSP: signed PD only
    • CDSP / CDSP1 / GPDSP: signed and unsigned PDs
  • Automatically select supported PD modes per domain

Result tracking and reporting

  • Track pass/fail results per domain and per PD mode during execution
  • Remove post-run log or file reparsing
  • Print a tabular summary per domain and PD mode

Behavior

Default behavior

  • Test all discovered DSP domains with supported PD modes

Legacy behavior

  • Preserve single-domain execution via:
    --domain-mode single --domain

Maintenance

  • Remove unused pick_default_domain() helper
  • Fix SKIP paths to exit with status 0
  • Resolve ShellCheck warnings (SC2317, SC2086, SC2188)
  • Fix trailing whitespace and missing EOF newline
  • Update YAML metadata and run.sh usage documentation

Expected Sample Output : (qcs9100-ride-sx)
image

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>
Copy link
Copy Markdown
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

  • 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

Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/run.sh Outdated
Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test.yaml
CLI_DOMAIN=""
CLI_DOMAIN_NAME=""
DOMAIN_MODE="all-supported" # ENHANCED: default to all-supported
PD_MODE="both" # ENHANCED: default to both PDs
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.

Same recommendation as for the YAML: either preserve old defaults here, or explicitly document that the default execution model is changing.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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
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.

After writing SKIP, exit 0

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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>
Copy link
Copy Markdown
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

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.

Comment thread Runner/suites/Multimedia/CDSP/fastrpc_test/fastrpc_test.yaml
@smuppand smuppand added the enhancement New feature or request label Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants