Fix-Point opened a new pull request, #4120:
URL: https://github.com/apache/nuttx-apps/pull/4120
## Summary
The `testing/ostest` watchdog test wanted to exercise the maximum legal
watchdog delay, but it hard-coded the expanded value (`CLOCK_MAX >> 2`)
that `WDOG_MAX_DELAY` used to have. Reference the macro directly
instead, so the test follows the wdog contract even if the kernel
changes the maximum — for example when the watchdog is backed by an
hrtimer whose limit is `HRTIMER_MAX_DELAY / NSEC_PER_TICK`.
## Impact
- Testing only: `testing/ostest/wdog.c`, one assertion setup line.
- No behavior change for existing kernels: with the current
`WDOG_MAX_DELAY = CLOCK_MAX >> 2` the test takes exactly the same
path as before.
## Testing
Verified on `rv-virt:nsh64` (riscv64, QEMU): full ostest run reaches
`ostest_main: Exiting with status 0`; the maximum-delay case reports
`wd_start with maximum delay, cancel OK, rest ...` with no assertion
failures. The kernel side that redefines `WDOG_MAX_DELAY` in terms of
`HRTIMER_MAX_DELAY` was used for the cross-check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]