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 |
smuppand
left a comment
There was a problem hiding this comment.
Kindly close the comments that have been addressed with the updated patches.
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>
This test 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>
| steps: | ||
| - REPO_PATH=$PWD | ||
| - cd "$REPO_PATH/Runner/suites/Kernel/Baseport/dmabuf_heap_kselftest" || true | ||
| - ./run.sh --binary-path "${KSELFTEST_DMA_BIN}" || true |
There was a problem hiding this comment.
This overrides the script default with an empty string, so default LAVA runs may SKIP instead of using /kselftest/dmabuf-heaps/dmabuf-heap.
Please either set:
KSELFTEST_DMA_BIN: "/kselftest/dmabuf-heaps/dmabuf-heap"
or only pass --binary-path when the variable is non-empty.
| - REPO_PATH=$PWD | ||
| - cd "$REPO_PATH/Runner/suites/Kernel/Baseport/dmabuf_heap_kselftest" || true | ||
| - ./run.sh --binary-path "${KSELFTEST_DMA_BIN}" || true | ||
| - $REPO_PATH/Runner/utils/send-to-lava.sh dmabuf_heap_kselftest.res || true |
There was a problem hiding this comment.
Both YAML files still mask errors with cd ... || true, ./[run.sh](http://run.sh/) || true, and send-to-lava || true.
Remove || true for cd and last step
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$__INIT_ENV_LOADED" ]; then |
| pass_count=$(echo "$totals_line" | grep -o " pass:[0-9]*" | cut -d':' -f2) | ||
| fail_count=$(echo "$totals_line" | grep -o " fail:[0-9]*" | cut -d':' -f2) | ||
| skip_count=$(echo "$totals_line" | grep -o "skip:[0-9]*" | cut -d':' -f2) | ||
| error_count=$(echo "$totals_line" | grep -o "error:[0-9]*" | cut -d':' -f2) |
There was a problem hiding this comment.
still parses TAP totals using grep -o. Recommend below awk parsing for pass/fail/skip/error fields. It can have it in this run.sh
tap_total_field() {
key="$1"
line="$2"
printf '%s\n' "$line" | awk -v key="$key" '
{
for (i = 1; i <= NF; i++) {
split($i, kv, ":")
if (kv[1] == key) {
print kv[2]
exit
}
}
}'
}
and call
pass_count="$(tap_total_field pass "$totals_line")"
fail_count="$(tap_total_field fail "$totals_line")"
skip_count="$(tap_total_field skip "$totals_line")"
error_count="$(tap_total_field error "$totals_line")"
Added the tests to check DMA configs, Device Tree Validation and upstream kselftests