Repository navigation
testing/drivers/taskwdt: test the watchdog task monitor. - #3908
Merged
acassis merged 1 commit intoOct 24, 2026
Merged
Conversation
The task watchdog supervisor is now the task monitor of the watchdog upper half, CONFIG_WATCHDOG_TASKMONITOR, and its channels are opened on CONFIG_WATCHDOG_DEVPATH instead of CONFIG_TASKWDT_DEVPATH. Depend on the new option and include nuttx/timers/watchdog.h. The ioctl that must fail with ENOTTY is an unused request, as the task monitor does not forward the other commands to the lower half. Add the handoff case: a thread opens a channel and another one feeds it, which a channel per open file description must allow. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
cederom
approved these changes
Oct 24, 2026
cederom
left a comment
Contributor
There was a problem hiding this comment.
Thank you @daniel-p-carvalho :-)
acassis
approved these changes
Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
taskwdt_test(CONFIG_TESTING_TASKWDT, added in #3874) tests the taskwatchdog supervisor. In apache/nuttx#20782 the supervisor is no longer a
separate driver: it became the task monitor of the watchdog upper half
(
CONFIG_WATCHDOG_TASKMONITOR), and its channels are opened onCONFIG_WATCHDOG_DEVPATHinstead of/dev/taskwdt.This change follows that:
WATCHDOG_TASKMONITORinstead ofTASKWDT, and theprogram includes
nuttx/timers/watchdog.hand opensCONFIG_WATCHDOG_DEVPATH;errorscase uses an unused request(
_WDIOC(0x7f)), becauseWDIOC_CAPTUREis now also rejected, withENOSYS, and no longer tests theENOTTYpath;handoff: one thread opens a channel and another one feeds it,which a channel per open file description must allow.
WATCHDOG_TASKMONITORonly exists with the nuttx PR, so this change buildsnothing until then and can be merged first. It must be merged before
apache/nuttx#20782, whose
sim:taskmonitorconfiguration enables this test.Impact
Test application only, off by default; no effect on existing configurations.
CONFIG_TASKWDTno longer exists with the nuttx PR, so the option cannot beselected for the old supervisor any more.
Testing
Build host: Linux x86_64 (Ubuntu), gcc for the sim, arm-none-eabi-gcc and
Microchip XC32 v6.00 for the boards. Run with the nuttx PR on
sim:taskmonitor,NUCLEO-L432KC and EV49N51A (PIC32MZ-W1): the cases that must not reset print
PASS(includinghandoff) and the others reset the system as expected. Theresults and logs are in apache/nuttx#20782.
tools/checkpatch.sh -m -gis clean for the commit and-ffor the two files(spelling and encoding checks were not run).