test: add hardware-independent self-test for issue #367 - #369
Open
Mahima Bhattaram (m-bhattar) wants to merge 1 commit into
Open
test: add hardware-independent self-test for issue #367#369Mahima Bhattaram (m-bhattar) wants to merge 1 commit into
Mahima Bhattaram (m-bhattar) wants to merge 1 commit into
Conversation
Contributor
|
Please update PR description and commit message |
Mahima Bhattaram (m-bhattar)
force-pushed
the
add-selftest
branch
from
August 5, 2026 08:30
eb452c8 to
dc6f69c
Compare
Add fastrpc_selftest, a hardware-independent test that exercises all 47
exported symbols from symbols.lst and passes make check without physical
DSP hardware present.
The current test suite requires functional DSP hardware, making it
incompatible with standard Linux distribution builds and CI/CD pipelines.
This patch adds fastrpc_selftest covering:
- Compile-time constants / macro arithmetic (domain IDs, REMOTE_SCALARS,
rpcmem heap IDs, dspqueue flags)
- Handle lifecycle: remote_handle_open/close, remote_handle64_open/close
- Handle invoke with INVALID handles (no crash)
- Control APIs: remote_handle_control (DSPRPC_GET_DSP_INFO/DSPRPC_GET_DOMAIN),
remote_handle64_control, remote_session_control
- Async job APIs: fastrpc_async_get_status, fastrpc_release_async_job
- rpcmem lifecycle: init, alloc, alloc2, alloc_def, to_fd, free, deinit
- fastrpc_mmap / fastrpc_munmap
- remote_register_buf / buf_attr / buf_attr2
- remote_register_fd / fd2
- remote_register_dma_handle / dma_handle_attr
- remote_set_mode
- Deprecated mapping APIs: remote_mmap/munmap, remote_mmap64/munmap64,
remote_mem_map/mem_unmap
- dspqueue: create (fails gracefully without hardware), close(NULL),
request; write/read/peek/export/get_stat run only when hardware present
- HAP_debug_v2 / HAP_debug_runtime
The selftest is Linux-only (guarded by 'if ANDROID_CC ... else ... endif')
and links against libcdsprpc.la from the build tree. make check exits 0
on a standard x86 machine with no DSP device installed.
Signed-off-by: Bharath Kumar <quic_bkumar@quicinc.com>
Signed-off-by: Mahima Bhattaram <mbhattar@qti.qualcomm.com>
Mahima Bhattaram (m-bhattar)
force-pushed
the
add-selftest
branch
from
August 11, 2026 03:52
dc6f69c to
289061d
Compare
Vinayak Katoch (quic-vkatoch)
approved these changes
Aug 12, 2026
Anandu Krishnan E (quic-anane)
approved these changes
Aug 13, 2026
Contributor
|
Pre-merge CI results — patch Validated On
Kernel: Test Matrix
LAVA Jobs: |
Ekansh Gupta (ekanshibu)
requested changes
Aug 25, 2026
| @@ -0,0 +1,578 @@ | |||
| // Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. | |||
Contributor
There was a problem hiding this comment.
use year-less copyright
Contributor
Author
There was a problem hiding this comment.
acked
| * Per the API contract these are void and must not crash. | ||
| */ | ||
| char dummy[64]; | ||
| remote_register_buf(dummy, (int)sizeof(dummy), -1); |
Contributor
There was a problem hiding this comment.
not checking error, is that expected?
Contributor
Author
There was a problem hiding this comment.
Yes, remote_register_buf returns void. The purpose of this test is only to verify that calling the deregister path on a buffer that was never registered is handled safely and does not crash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add fastrpc_selftest, a hardware-independent test that exercises all 47 exported symbols from symbols.lst and passes make check without physical DSP hardware present.
The current test suite requires functional DSP hardware, making it incompatible with standard Linux distribution builds and CI/CD pipelines. This patch adds fastrpc_selftest covering:
rpcmem heap IDs, dspqueue flags)
remote_handle64_control, remote_session_control
remote_mem_map/mem_unmap
request; write/read/peek/export/get_stat run only when hardware present
The selftest is Linux-only (guarded by 'if ANDROID_CC ... else ... endif') and links against libcdsprpc.la from the build tree. make check exits 0 on a standard x86 machine with no DSP device installed.
Fixes: #367
CRs-Fixed: 4632155