Add DMA enablement tests - #296
Conversation
90efb69 to
6b50d76
Compare
|
This one should be split into 3 commits, unlike the simple one commit and one-testcase PR. It currently combines:
|
This should still be split into 3 commits. Also address the structural commensts. The PR is 1 commit / 7 files / 3 logical chunks |
Srikanth Muppandam (smuppand)
left a comment
There was a problem hiding this comment.
Kindly close the comments that have been addressed with the updated patches.
963bc70 to
a9ffc22
Compare
9876cee to
9e46c25
Compare
677cb77 to
3641787
Compare
|
I noticed that previous comments haven't been marked as resolved. Please close the comments that have been addressed and take care of any outstanding ones. |
f273c2b to
efcf58a
Compare
|
Srikanth Muppandam (@smuppand) all comments are addressed. |
785c402 to
0cd4e08
Compare
|
vnarapar, please rebase and apply the small fixes mentioned above. |
|
@ualcomm/qualcomm-linux-testing.triage This pull request has been marked as stale due to 30 days of inactivity and will automatically close after an additional 5 days. |
|
@ualcomm/qualcomm-linux-testing.triage This pull request has been marked as stale due to 30 days of inactivity and will automatically close after an additional 5 days. |
Add the helper function to check kernel optional config Signed-off-by: Vamsee Narapareddi <vnarapar@qti.qualcomm.com>
This test validates the DMA-BUF subsystem configuration on Qualcomm platforms, including kernel configuration, device tree setup, and system interfaces Signed-off-by: Vamsee Narapareddi <vnarapar@qti.qualcomm.com>
Runs the `dmabuf-heap` binary from the Linux kernel selftests suite to validate DMA-BUF heap functionality Signed-off-by: Vamsee Narapareddi <vnarapar@qti.qualcomm.com>
| OPTIONAL_CONFIGS="CONFIG_TEE_DMABUF_HEAPS CONFIG_HAS_DMA CONFIG_DMA_HEAP CONFIG_DMA_CMA" | ||
|
|
||
| log_info "Checking optional DMA-BUF configurations..." | ||
| if ! check_optional_config "$OPTIONAL_CONFIGS"; then |
There was a problem hiding this comment.
optional configs still fail the testcase, Keep optional configuration checks warning-only. Log the missing optional symbols, but do not change the final verdict.
| done | ||
| fi | ||
|
|
||
| if check_dt_nodes "/proc/device-tree/soc*/dma* /proc/device-tree/soc*/qcom,ion* /proc/device-tree/ion*"; then |
There was a problem hiding this comment.
generic DMA nodes are required as DMA-BUF proof. Make this informational, or validate only a clearly documented platform-specific heap binding. The functional requirement should remain the heap device and, when available, the upstream kselftest.
| log_info " Skipped: $skip_count" | ||
| log_info " Errors: $error_count" | ||
|
|
||
| if [ "$pass_count" -eq 0 ] && [ "$skip_count" -eq 0 ]; then |
There was a problem hiding this comment.
all-skipped kselftest becomes PASS. Emit top-level SKIP when pass_count=0 and skip_count>0. Reserve PASS for at least one executed successful test and no failure or error.
| log_info "DMA-BUF buffer information:" | ||
|
|
||
| # Count total buffers | ||
| total_bufs=$(grep -c "^Dma-buf" /sys/kernel/debug/dma_buf/bufinfo 2>/dev/null || echo 0) |
There was a problem hiding this comment.
duplicated zero output from grep -c
Use grep -c ... || true, then normalize the captured result once.
| ### 2. Device Tree Validation | ||
| - Reserved memory nodes (`/proc/device-tree/reserved-memory`) - informational | ||
| - Platform-specific DMA heap nodes | ||
| - Memory region sizes and configurations |
There was a problem hiding this comment.
documentation claims unimplemented DT detail
Narrow the README to informational region enumeration or implement the stated parsing.
Added the tests to check DMA configs, Device Tree Validation and upstream kselftests