Skip to content

Commit e5772c0

Browse files
committed
test(BT_FW_KMD_Service): align dependency handling and FW verdict with helpers
Use check_dependencies() for required tools and rely on lib_bluetooth.sh helper behavior for firmware bring-up verdict, avoiding duplicate skip logic in run.sh. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent 55b6669 commit e5772c0

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

  • Runner/suites/Connectivity/Bluetooth/BT_FW_KMD_Service

Runner/suites/Connectivity/Bluetooth/BT_FW_KMD_Service/run.sh

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ log_info "------------------------------------------------------------"
7474
log_info "Starting $TESTNAME"
7575

7676
log_info "Checking dependencies: bluetoothctl hciconfig dmesg lsmod"
77-
check_dependencies bluetoothctl hciconfig dmesg lsmod
78-
77+
if ! check_dependencies bluetoothctl hciconfig dmesg lsmod; then
78+
echo "$TESTNAME SKIP" > "$RES_FILE"
79+
exit 0
80+
fi
7981
# ---------- Bluetooth service / daemon ----------
8082
log_info "Checking if bluetoothd (or bluetooth.service) is running..."
8183
if btsvcactive; then
@@ -108,11 +110,26 @@ else
108110
fi
109111

110112
# ---------- Firmware load dmesg ----------
111-
if btfwloaded; then
112-
log_pass "Firmware load/setup appears completed (dmesg)."
113+
if command -v btfwloaded >/dev/null 2>&1; then
114+
btfwloaded
115+
rc=$?
116+
case "$rc" in
117+
0)
118+
log_pass "Firmware load/setup appears completed (dmesg)."
119+
;;
120+
2)
121+
log_warn "Firmware load/setup completed after retry, transient errors seen earlier (dmesg)."
122+
inc_warn
123+
;;
124+
*)
125+
log_fail "Firmware load/setup does NOT look clean (see recent Bluetooth/QCA/WCN dmesg lines above)."
126+
inc_fail
127+
;;
128+
esac
113129
else
114-
log_fail "Firmware load/setup does NOT look clean (see recent Bluetooth/QCA/WCN dmesg lines above)."
115-
inc_fail
130+
# No SKIP: continue test, just warn.
131+
log_warn "btfwloaded() helper not available firmware-load dmesg validation not performed."
132+
inc_warn
116133
fi
117134

118135
# ---------- Kernel modules / KMD ----------

0 commit comments

Comments
 (0)