Skip to content

Commit 08dd77d

Browse files
committed
Enhanced watchdog test
This commit is to enhance the watchdog test and to skip for QCS6490 Added soc_id function in functestlib.sh Signed-off-by: Vamsee Narapareddi <[email protected]>
1 parent 6dac19b commit 08dd77d

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

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

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,26 @@ log_info "----------------------------------------------------------------------
3939
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
4040
log_info "=== Test Initialization ==="
4141

42+
soc_id=$(getsocId)
43+
44+
if [ $soc_id = 498 ]; then
45+
log_skip "Testcase not applicable to this target"
46+
echo "$TESTNAME SKIP" > "$res_file"
47+
exit 0
48+
fi
49+
4250
if [ -e /dev/watchdog ]; then
4351
log_pass "/dev/watchdog node is present."
52+
CONFIGS="CONFIG_WATCHDOG CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED"
53+
check_kernel_config "$CONFIGS" || {
54+
log_fail "$TESTNAME : Required kernel configs missing"
55+
log_fail "$TESTNAME FAIL"
56+
echo "$TESTNAME FAIL" > "$res_file"
57+
exit 1
58+
}
4459
log_pass "$TESTNAME : Test Passed"
4560
echo "$TESTNAME PASS" > "$res_file"
46-
exit 0
47-
else
48-
log_fail "/dev/watchdog node is not present."
49-
log_fail "$TESTNAME : Test Failed"
50-
echo "$TESTNAME FAIL" > "$res_file"
51-
exit 1
61+
exit 0
5262
fi
53-
log_info "-------------------Completed $TESTNAME Testcase---------------------------"
63+
echo "$TESTNAME FAIL" > "$res_file"
64+
log_info "-------------------Completed $TESTNAME Testcase---------------------------"

Runner/utils/functestlib.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,3 +1475,12 @@ scan_dmesg_errors() {
14751475
log_info "No $label-related errors found in recent dmesg logs."
14761476
fi
14771477
}
1478+
1479+
getsocId() {
1480+
if [ -r /sys/devices/soc0/soc_id ]; then
1481+
cat /sys/devices/soc0/soc_id
1482+
else
1483+
log_error "soc_id file not found or not readable"
1484+
return 1
1485+
fi
1486+
}

0 commit comments

Comments
 (0)