Skip to content

Commit c145f7d

Browse files
authored
Merge pull request qualcomm-linux#136 from smuppand/rproc
Fix: ensure wpss_remoteproc.res file is always generated
2 parents 595bfc1 + fe35b49 commit c145f7d

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

Runner/suites/Kernel/Baseport/adsp_remoteproc/run.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ fi
2727
# Always source functestlib.sh, using $TOOLS exported by init_env
2828
# shellcheck disable=SC1090,SC1091
2929
. "$TOOLS/functestlib.sh"
30-
30+
3131
TESTNAME="adsp_remoteproc"
3232
RES_FILE="./$TESTNAME.res"
3333
FW="adsp"
3434

3535
test_path=$(find_test_case_by_name "$TESTNAME")
3636
cd "$test_path" || exit 1
37-
37+
3838
log_info "-----------------------------------------------------------------------------------------"
3939
log_info "------------------- Starting $TESTNAME Testcase ----------------------------"
4040
log_info "=== Test Initialization ==="
@@ -59,7 +59,8 @@ fi
5959
# get_remoteproc_by_firmware prints: "path|state|firmware|name"
6060
entries="$(get_remoteproc_by_firmware "$FW" "" all)" || entries=""
6161
if [ -z "$entries" ]; then
62-
fail_and_exit "$FW present in DT but no /sys/class/remoteproc entry found"
62+
log_fail "$FW present in DT but no /sys/class/remoteproc entry found"
63+
exit 1
6364
fi
6465

6566
count_instances=$(printf '%s\n' "$entries" | wc -l)

Runner/suites/Kernel/Baseport/cdsp_remoteproc/run.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ fi
2828
# Always source functestlib.sh, using $TOOLS exported by init_env
2929
# shellcheck disable=SC1090,SC1091
3030
. "$TOOLS/functestlib.sh"
31-
31+
3232
TESTNAME="cdsp_remoteproc"
3333
RES_FILE="./$TESTNAME.res"
3434
FW="cdsp"
3535

3636
test_path=$(find_test_case_by_name "$TESTNAME")
3737
cd "$test_path" || exit 1
38-
38+
3939
log_info "-----------------------------------------------------------------------------------------"
4040
log_info "------------------- Starting $TESTNAME Testcase ----------------------------"
4141
log_info "=== Test Initialization ==="
@@ -60,7 +60,8 @@ fi
6060
# get_remoteproc_by_firmware prints: "path|state|firmware|name"
6161
entries="$(get_remoteproc_by_firmware "$FW" "" all)" || entries=""
6262
if [ -z "$entries" ]; then
63-
fail_and_exit "$FW present in DT but no /sys/class/remoteproc entry found"
63+
log_fail "$FW present in DT but no /sys/class/remoteproc entry found"
64+
exit 1
6465
fi
6566

6667
count_instances=$(printf '%s\n' "$entries" | wc -l)

Runner/suites/Kernel/Baseport/gpdsp_remoteproc/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ fi
2828
# Always source functestlib.sh, using $TOOLS exported by init_env
2929
# shellcheck disable=SC1090,SC1091
3030
. "$TOOLS/functestlib.sh"
31-
31+
3232
TESTNAME="gpdsp_remoteproc"
3333
RES_FILE="./$TESTNAME.res"
3434
FW="gpdsp"
3535

3636
test_path=$(find_test_case_by_name "$TESTNAME")
3737
cd "$test_path" || exit 1
38-
38+
3939
log_info "-----------------------------------------------------------------------------------------"
4040
log_info "------------------- Starting $TESTNAME Testcase ----------------------------"
4141
log_info "=== Test Initialization ==="

Runner/suites/Kernel/Baseport/wpss_remoteproc/run.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
44
# SPDX-License-Identifier: BSD-3-Clause-Clear
5+
#
56
# Robustly find and source init_env
67
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
78
INIT_ENV=""
@@ -27,7 +28,7 @@ fi
2728
# Always source functestlib.sh, using $TOOLS exported by init_env
2829
# shellcheck disable=SC1090,SC1091
2930
. "$TOOLS/functestlib.sh"
30-
31+
3132
TESTNAME="wpss_remoteproc"
3233
FW="wpss"
3334
RES_FILE="./$TESTNAME.res"
@@ -174,7 +175,9 @@ else
174175
else
175176
# If DT said WPSS present but neither remoteproc nor driver -> FAIL
176177
if [ "$dt_says_present" -eq 1 ]; then
177-
fail_and_exit "DT lists $FW but no remoteproc and ath11k not loaded"
178+
log_fail "DT lists $FW but no remoteproc and ath11k not loaded"
179+
echo "$TESTNAME FAIL" >"$RES_FILE"
180+
exit 1
178181
fi
179182
log_skip "$TESTNAME SKIP – neither remoteproc nor ath11k path available"
180183
echo "$TESTNAME SKIP" >"$RES_FILE"
@@ -200,6 +203,7 @@ if [ -e "$1" ]; then
200203
else
201204
log_info "No wlan interface yet (maybe not brought up)"
202205
fi
206+
203207
# Final result for driver path: PASS if we got here
204208
log_pass "WPSS driver path checks passed"
205209
echo "$TESTNAME PASS" >"$RES_FILE"

0 commit comments

Comments
 (0)