-
Notifications
You must be signed in to change notification settings - Fork 21
Add gdsp_remoteproc test script and README for Lemans platform #89
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
Closed
Sai-teja573
wants to merge
1
commit into
qualcomm-linux:main
from
Sai-teja573:gdsp-remoteproc-script
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/Scheduler/CPU_affinity/run.sh
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/CPUFreq_Validation/run.sh
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/Interrupts/run.sh
100755 → 100644
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/Probe_Failure_Check/run.sh
100755 → 100644
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/Reboot_health_check/Readme.md
100755 → 100644
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/Reboot_health_check/run.sh
100755 → 100644
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/Reboot_health_check/setup_systemd.sh
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/adsp_remoteproc/run.sh
100755 → 100644
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/cdsp_remoteproc/run.sh
100755 → 100644
Empty file.
68 changes: 68 additions & 0 deletions
68
Runner/suites/Kernel/FunctionalArea/baseport/gdsp_remoteproc/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# gdsp_remoteproc Test | ||
|
||
© Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
SPDX-License-Identifier: BSD-3-Clause-Clear | ||
|
||
## Overview | ||
|
||
This test case validates the functionality of the **GPDSP (General Purpose DSP)** firmware loading and control on the **Lemans** platform. It specifically targets: | ||
|
||
- `gpdsp0` | ||
- `gpdsp1` | ||
|
||
The script ensures that each GPDSP remote processor: | ||
- Is currently running | ||
- Can be stopped successfully | ||
- Can be restarted and returns to the running state | ||
|
||
This is essential for verifying the stability and control of DSP subsystems on Qualcomm-based platforms. | ||
|
||
## Usage | ||
|
||
### Instructions | ||
|
||
1. **Transfer the Script**: Use `scp` or any file transfer method to copy the script to the Lemans target device. | ||
2. **Navigate to the Script Directory**: SSH into the device and go to the directory where the script is located. | ||
3. **Run the Script**: | ||
```sh | ||
./run.sh | ||
``` | ||
--- | ||
#### Quick Example | ||
``` | ||
git clone <this-repo> | ||
cd <this-repo> | ||
scp -r common Runner user@target_device_ip:<Path in device> | ||
ssh user@target_device_ip | ||
cd <Path in device>/Runner && ./run-test.sh gdsp_remoteproc | ||
``` | ||
--- | ||
## Prerequisites | ||
1. The device must expose `/sys/class/remoteproc/remoteproc*/firmware and /state` interfaces. | ||
2. Root access may be required to write to remoteproc state files. | ||
3. The firmware names must include gpdsp0 and gpdsp1. | ||
--- | ||
## Result Format | ||
Test result will be saved in `gdsp_remoteproc.res` as: | ||
## Output | ||
A .res file is generated in the same directory: | ||
|
||
`gdsp_remoteproc PASS` OR `gdsp_remoteproc FAIL` | ||
|
||
## Sample Log | ||
``` | ||
Output | ||
|
||
[INFO] 1970-01-01 03:56:11 - ------------------------------------------------------------------------------ | ||
[INFO] 1970-01-01 03:56:11 - -------------------Starting gdsp_remoteproc Testcase---------------------------- | ||
[INFO] 1970-01-01 03:56:11 - === Test Initialization === | ||
[INFO] 1970-01-01 03:56:11 - Found gpdsp0 at /sys/class/remoteproc/remoteproc3 | ||
[PASS] 1970-01-01 03:56:11 - gpdsp0 stop successful | ||
[INFO] 1970-01-01 03:56:11 - Restarting gpdsp0 | ||
[PASS] 1970-01-01 03:56:12 - gpdsp0 PASS | ||
[INFO] 1970-01-01 03:56:12 - Found gpdsp1 at /sys/class/remoteproc/remoteproc4 | ||
[PASS] 1970-01-01 03:56:12 - gpdsp1 stop successful | ||
[INFO] 1970-01-01 03:56:12 - Restarting gpdsp1 | ||
[PASS] 1970-01-01 03:56:12 - gpdsp1 PASS | ||
[INFO] 1970-01-01 03:56:12 - -------------------Completed gdsp_remoteproc Testcase---------------------------- | ||
``` |
77 changes: 77 additions & 0 deletions
77
Runner/suites/Kernel/FunctionalArea/baseport/gdsp_remoteproc/run.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/sh | ||
|
||
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | ||
# SPDX-License-Identifier: BSD-3-Clause-Clear | ||
|
||
# Robustly find and source init_env | ||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
INIT_ENV="" | ||
SEARCH="$SCRIPT_DIR" | ||
while [ "$SEARCH" != "/" ]; do | ||
if [ -f "$SEARCH/init_env" ]; then | ||
INIT_ENV="$SEARCH/init_env" | ||
break | ||
fi | ||
SEARCH=$(dirname "$SEARCH") | ||
done | ||
|
||
if [ -z "$INIT_ENV" ]; then | ||
echo "[ERROR] Could not find init_env (starting at $SCRIPT_DIR)" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$__INIT_ENV_LOADED" ]; then | ||
# shellcheck disable=SC1090 | ||
. "$INIT_ENV" | ||
fi | ||
# shellcheck disable=SC1090,SC1091 | ||
. "$TOOLS/functestlib.sh" | ||
|
||
TESTNAME="gdsp_remoteproc" | ||
test_path=$(find_test_case_by_name "$TESTNAME") | ||
cd "$test_path" || exit 1 | ||
res_file="./$TESTNAME.res" | ||
|
||
log_info "-----------------------------------------------------------------------------------------" | ||
log_info "-------------------Starting $TESTNAME Testcase----------------------------" | ||
log_info "=== Test Initialization ===" | ||
|
||
for gdsp_firmware in gpdsp0 gpdsp1; do | ||
log_info "Processing $gdsp_firmware" | ||
rproc_path=$(get_remoteproc_path_by_firmware "$gdsp_firmware") | ||
if [ -z "$rproc_path" ]; then | ||
log_fail "$gdsp_firmware remoteproc path not found" | ||
echo "$TESTNAME FAIL" > "$res_file" | ||
exit 1 | ||
fi | ||
|
||
log_info "Found $gdsp_firmware remoteproc at $rproc_path" | ||
|
||
state=$(get_remoteproc_state "$rproc_path") | ||
if [ "$state" != "running" ]; then | ||
log_fail "$gdsp_firmware not running initially" | ||
echo "$TESTNAME FAIL" > "$res_file" | ||
exit 1 | ||
fi | ||
|
||
if ! stop_remoteproc "$rproc_path"; then | ||
log_fail "$gdsp_firmware stop failed" | ||
echo "$TESTNAME FAIL" > "$res_file" | ||
exit 1 | ||
else | ||
log_pass "$gdsp_firmware stop successful" | ||
fi | ||
|
||
log_info "Restarting $gdsp_firmware" | ||
if ! start_remoteproc "$rproc_path"; then | ||
log_fail "$gdsp_firmware start failed" | ||
echo "$TESTNAME FAIL" > "$res_file" | ||
exit 1 | ||
fi | ||
|
||
log_pass "$gdsp_firmware PASS" | ||
done | ||
|
||
echo "$TESTNAME PASS" > "$res_file" | ||
log_info "-------------------Completed $TESTNAME Testcase----------------------------" | ||
exit 0 |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/remoteproc/run.sh
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/run.sh
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Multimedia/Video/iris_v4l2_video_decode/h264Decoder.json
100755 → 100644
Empty file.
Empty file.
Empty file modified
0
Runner/suites/Multimedia/Video/iris_v4l2_video_encode/h264Encoder.json
100755 → 100644
Empty file.
Empty file.
Empty file.
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
Empty file.
Empty file.
Empty file.
Oops, something went wrong.
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.
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.
Good idea to have a modular and reusable approach for remoteproc validation. It's better to move it to functestlib.sh files, allowing it to find the remoteproc path for a given firmware substring.