apps/examples/watchdog: Improve help message and add hang test#7331
apps/examples/watchdog: Improve help message and add hang test#7331seokhun-eom24 wants to merge 2 commits into
Conversation
Improve help message to explain parameters and their usage.
Add parameter validation to prevent invalid values in integer overflow and argument string length overflow.
[Help Message]
```
TASH>>Usage:
watchdog <command> [arguments]
Commands:
help
Show this help message
expire [timeout_ms] [status_period_ms]
Start watchdog expiration test
timeout_ms Watchdog timeout in milliseconds
Default: 30001 ms
status_period_ms Status print interval in milliseconds
0 disables periodic status printing
Default: 0 ms
keepalive
Send keepalive signal to watchdog
status
Show current watchdog status
stop
Stop watchdog
pause
Pause watchdog
resume
Resume watchdog
pause_resume [pause_ms] [resume_ms]
Run one watchdog pause/resume test sequence
pause_ms Pause duration in milliseconds
Default: 1000 ms
resume_ms Resume duration in milliseconds
Default: 200 ms
Examples:
watchdog expire
watchdog expire 30001 1000
watchdog pause_resume
watchdog pause_resume 1000 200
Notes:
pause_resume timeout = pause_ms * 10
```
Signed-off-by: seokhun-eom <seokhun.eom@samsung.com>
Implemented a new `watchdog hang` command to test watchdog operation in a hang situation. This test is only available on flat build. It uses `sched_lock` and `enter_critical_section` to make hang situation. Signed-off-by: seokhun-eom <seokhun.eom@samsung.com>
PR #7331 — apps/examples/watchdog: Improve help message and add hang test
Repository: Base → Head: HEAD Commit: Scope: Review Summary
Final Verdict: 💬 Comment Must-Fix IssuesNo blocking issues found. Nice-to-Have Improvements1. Add explicit validation evidence for the FLAT-only hang command
Problem Impact
Recommended Action
Example Validation Matrix
Notable Improvements✔ Safer sleep argument bounds
✔ FLAT-only hang logic is isolated
✔ Help output now describes command arguments
Final AssessmentMust-Fix Summary
Nice-to-Have Summary
Residual Risk / Test Gap
Final Verdict
The PR is reasonable to continue, with no merge-blocking issue found in the reviewed diff. The main remaining gap is validation evidence for the new FLAT-only hang command because its expected success condition is a hardware watchdog reset. |
1. apps/examples/watchdog: Improve help message and parameter validation
Improve help message to explain parameters and their usage.
Add parameter validation to prevent invalid values in integer overflow and argument string length overflow.
[Help Message]
2. apps/examples/watchdog: Add watchdog hang test in flat build
Implemented a new
watchdog hangcommand to test watchdog operation in a hang situation.This test is only available on flat build.
It uses
sched_lockandenter_critical_sectionto make hang situation.