Skip to content

Conversation

smuppand
Copy link
Contributor

@smuppand smuppand commented Sep 3, 2025

This PR makes the FastRPC test runner deterministic and CI-friendly:

Launch location: cd /usr/bin and run ./fastrpc_test so the adjacent linux/ assets are found consistently.

Domain selection: new --domain <0|1|2|3> and --domain-name <adsp|mdsp|sdsp|cdsp> flags, with env fallbacks (FASTRPC_DOMAIN, FASTRPC_DOMAIN_NAME). If unset, we auto-pick: CDSP(3) if present, else ADSP(0), else SDSP(2), else 3.

PD mode: default to system PD (-U 0). Opt-in to user PD with --user-pd or FASTRPC_USER_PD=1.

Safer binary pathing: refuse /bin by default (common failure case on ramdisks). Can override with ALLOW_BIN_FASTRPC=1 or --bin-dir=/bin.

Better diagnostics: log SoC info and current *dsp remoteproc state via existing helpers; capture per-iteration *.env, *.cmd, *.out, *.rc (and dmesg on failures); print the exact command with safe quoting.

… logging

- Always cd to /usr/bin and launch ./fastrpc_test so bundled assets
  (/usr/bin/linux) are discovered reliably.
- Add domain selection:
    * --domain <0|1|2|3> or --domain-name <adsp|mdsp|sdsp|cdsp>
    * ENV overrides: FASTRPC_DOMAIN / FASTRPC_DOMAIN_NAME
    * Auto-pick if unset: CDSP(3) if present, else ADSP(0), else SDSP(2), else 3
- PD mode: default -U 0; opt-in user PD via --user-pd or FASTRPC_USER_PD=1
- Refuse /bin by default (seen to fail on some ramdisks); allow with
  ALLOW_BIN_FASTRPC=1 or explicit --bin-dir=/bin
- Stronger CI diagnostics:
    * log SoC info (machine/soc_id/platform_version)
    * enumerate *dsp remoteprocs via existing helpers
    * per-iteration .env/.cmd/.out/.rc (and dmesg on error)
    * show exact command with safe quoting
- Safer argv construction and quoting; no reliance on shell word-splitting
- Result file always produced (PASS/FAIL)

Examples:
  ./run.sh                          # auto domain (likely CDSP), -U 0
  ./run.sh --domain 0               # ADSP
  ./run.sh --domain-name cdsp       # CDSP
  FASTRPC_USER_PD=1 ./run.sh        # run with -U 1
  ./run.sh --bin-dir /usr/bin       # explicit path if needed
Signed-off-by: Srikanth Muppandam <[email protected]>
Copy link
Contributor

@abbajaj806 abbajaj806 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@abbajaj806 abbajaj806 merged commit d31f4c5 into qualcomm-linux:main Sep 3, 2025
8 checks passed
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.

2 participants