File tree Expand file tree Collapse file tree 2 files changed +48
-7
lines changed
suites/Kernel/Baseport/watchdog Expand file tree Collapse file tree 2 files changed +48
-7
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,35 @@ log_info "----------------------------------------------------------------------
3939log_info " -------------------Starting $TESTNAME Testcase----------------------------"
4040log_info " === Test Initialization ==="
4141
42+ soc_id=$( getsocId)
43+
44+ if [ $? -eq 0 ]; then
45+ log_info " SOC ID is: $soc_id "
46+ else
47+ log_skip " Failed to retrieve SOC ID"
48+ echo " $TESTNAME SKIP" > " $res_file "
49+ exit 0
50+ fi
51+
52+
53+ if [ $soc_id = " 498" ]; then
54+ log_skip " Testcase not applicable to this target"
55+ echo " $TESTNAME SKIP" > " $res_file "
56+ exit 0
57+ fi
58+
4259if [ -e /dev/watchdog ]; then
4360 log_pass " /dev/watchdog node is present."
61+ CONFIGS=" CONFIG_WATCHDOG CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED"
62+ for cfg in $CONFIGS ; do
63+ if ! check_kernel_config " $cfg " 2> /dev/null; then
64+ log_fail " $cfg is not enabled"
65+ exit 1
66+ fi
67+ done
4468 log_pass " $TESTNAME : Test Passed"
4569 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
70+ exit 0
5271fi
53- log_info " -------------------Completed $TESTNAME Testcase---------------------------"
72+ echo " $TESTNAME FAIL" > " $res_file "
73+ log_info " -------------------Completed $TESTNAME Testcase---------------------------"
Original file line number Diff line number Diff line change @@ -1475,3 +1475,24 @@ scan_dmesg_errors() {
14751475 log_info " No $label -related errors found in recent dmesg logs."
14761476 fi
14771477}
1478+
1479+ getsocId () {
1480+ for path in /sys/devices/soc0/soc_id /sys/devices/system/soc/soc0/id; do
1481+ if [ -r " $path " ]; then
1482+ read -r soc_id < " $path "
1483+ case " $soc_id " in
1484+ ' ' |* [!0-9]* )
1485+ log_error " Invalid soc_id" >&2
1486+ return 1
1487+ ;;
1488+ * )
1489+ echo " $soc_id "
1490+ return 0
1491+ ;;
1492+ esac
1493+ fi
1494+ done
1495+
1496+ log_error " soc_id file not found or not readable" >&2
1497+ return 1
1498+ }
You can’t perform that action at this time.
0 commit comments