-
Notifications
You must be signed in to change notification settings - Fork 21
Enhanced watchdog test #120
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,15 +39,37 @@ log_info "---------------------------------------------------------------------- | |
log_info "-------------------Starting $TESTNAME Testcase----------------------------" | ||
log_info "=== Test Initialization ===" | ||
|
||
soc_id=$(getsocId) | ||
|
||
if [ $? -eq 0 ]; then | ||
log_info "SOC ID is: $soc_id" | ||
else | ||
log_skip "Failed to retrieve SOC ID" | ||
echo "$TESTNAME SKIP" > "$res_file" | ||
exit 0 | ||
fi | ||
|
||
|
||
if [ $soc_id = "498" ]; then | ||
log_skip "Testcase not applicable to this target" | ||
echo "$TESTNAME SKIP" > "$res_file" | ||
exit 0 | ||
fi | ||
|
||
if [ -e /dev/watchdog ]; then | ||
log_pass "/dev/watchdog node is present." | ||
CONFIGS="CONFIG_WATCHDOG CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED" | ||
for cfg in $CONFIGS; do | ||
log_info "Checking if $cfg is enabled" | ||
if ! check_kernel_config "$cfg" 2>/dev/null; then | ||
log_fail "$cfg is not enabled" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's better to log a message when checking the config, especially if it fails at that step. This will make it easier to debug failures in the CI environment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Example logs of config failure [INFO] 2022-04-29 00:07:33 - ========== Test Summary ========== FAILED: SKIPPED: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In addition to dev node and kernel configuration checks, it would be beneficial to include some functional validation based on the type of build—whether it's a full build or a kernel-only build. For kernel builds, try opening and petting the watchdog, and for systemd-based builds, consider checking the system services. |
||
echo "$TESTNAME FAIL" > "$res_file" | ||
exit 1 | ||
fi | ||
done | ||
log_pass "$TESTNAME : Test Passed" | ||
echo "$TESTNAME PASS" > "$res_file" | ||
exit 0 | ||
else | ||
log_fail "/dev/watchdog node is not present." | ||
log_fail "$TESTNAME : Test Failed" | ||
echo "$TESTNAME FAIL" > "$res_file" | ||
exit 1 | ||
exit 0 | ||
fi | ||
log_info "-------------------Completed $TESTNAME Testcase---------------------------" | ||
echo "$TESTNAME FAIL" > "$res_file" | ||
log_info "-------------------Completed $TESTNAME Testcase---------------------------" |
Uh oh!
There was an error while loading. Please reload this page.