-
Notifications
You must be signed in to change notification settings - Fork 17
Modularized adsp, cdsp, and wpss remoteproc tests using common helper functions #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… functions. Refactored adsp, cdsp, and wpss remoteproc tests. Introduced modular helper usage and standardized logging. Signed-off-by: Sai-teja573 <122cs0573@nitrkl.ac.in>
# Find the remoteproc path for a given firmware substring (e.g., "adsp", "cdsp", "gdsp"). | ||
get_remoteproc_path_by_firmware() { | ||
name="$1" | ||
local idx path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace local
with unscoped variable.
log_fail "$TESTNAME : Test Failed" | ||
echo "$TESTNAME FAIL" > "$test_path/$TESTNAME.res" | ||
rproc_path=$(get_remoteproc_path_by_firmware "adsp") || { | ||
log_fail "$TESTNAME" "adsp remoteproc path not found" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s better to mark this as info and skip the test, rather than fail it. Since the node isn’t present, further validation isn’t needed. If any additional steps fail, then it would make sense to mark it as a failure.
state=$(get_remoteproc_state "$rproc_path") | ||
[ "$state" = "running" ] || { | ||
log_fail "$TESTNAME" "adsp remoteproc not running" | ||
echo "$TESTNAME FAIL" > "$res_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about adding logs or checks to confirm if the firmware loads when a particular subsystem isn’t running? This could help with debugging in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few changes are needed to make it more CI-friendly and easier to debug failures.
Refactored remoteproc test scripts for adsp, cdsp, and wpss to use modular helper functions from functestlib.sh.
Changes include:
This modularization lays the foundation for extending the same structure to other subsystems like gdsp and general remoteproc validation in future updates.