Skip to content

automated: linux: add remoteproc smoke test - #634

Open
lool wants to merge 1 commit into
Linaro:masterfrom
lool:remoteproc
Open

automated: linux: add remoteproc smoke test#634
lool wants to merge 1 commit into
Linaro:masterfrom
lool:remoteproc

Conversation

@lool

@lool lool commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Some remoteprocs silently fail to come up, e.g. when their firmware
can't be loaded after an initramfs update.

Add a smoke test which enumerates every remoteproc and checks that it
reached the running or attached state. Auto-detect all remoteprocs by
default; set DEVICE to target specific ones.

Some remoteprocs are not booted by the kernel at all, either because no
firmware is shipped for them or because another subsystem owns their
lifecycle, e.g. ath11k for wpss. Skip modem and wpss by default
rather than failing them, and make the list a parameter since it
varies per SoC. Their state is still logged to help triage. Boards
without any remoteproc report remoteproc-device-exists as skip
instead of failing.

Some remoteprocs silently fail to come up, e.g. when their firmware
can't be loaded after an initramfs update.

Add a smoke test which enumerates every remoteproc and checks that it
reached the running or attached state. Auto-detect all remoteprocs by
default; set DEVICE to target specific ones.

Some remoteprocs are not booted by the kernel at all, either because no
firmware is shipped for them or because another subsystem owns their
lifecycle, e.g. ath11k for wpss. Skip modem and wpss by default
rather than failing them, and make the list a parameter since it
varies per SoC.  Their state is still logged to help triage. Boards
without any remoteproc report remoteproc-device-exists as skip
instead of failing.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
@lool

lool commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

local name="$1"
for dir in $(list_remoteprocs); do
[ "$(cat "${dir}/name")" = "${name}" ] && echo "${dir}"
done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should return 0

# remoteprocs are booted asynchronously, so they may not be enumerated yet
wait_for_device

if [ -n "${DEVICE}" ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So this checks if device has remoteproc. I would use report_skip "remoteproc-device-exists" and report_pass "remoteproc-device-exists" at the top of the test.

Something like

all_dirs="$(list_remoteprocs)"
if [ -z "${all_dirs}" ]; then
report_skip "remoteproc-device-exists"
else
report_pass "remoteproc-device-exists"
fi

(and catch it at the bottom of this function). So you will get a remoteproc-device-exists skip when no remoteprocs are found

local name
name="$(cat "${dir}/name")"
if [ "$(remoteprocs_by_name "${name}" | wc -l)" -gt 1 ]; then
echo "remoteproc-${name}-$(basename "${dir}")-running"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will the name will be stable across boots. Could we not use basename "$(readlink -f "${dir}/device")" to get a reliable name beforehand, just to be sure.

# a requested remoteproc which doesn't exist is a failure, unless it is one
# which is not expected to be running anyway
dirs=""
for name in ${DEVICE}; do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might be worth a cheap dedupe call here.

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