This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 6a6540219 testing/ostest: use WDOG_MAX_DELAY for the maximum wdog
delay test
6a6540219 is described below
commit 6a65402190490c21675e6b019e4ab93bfd88fe19
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Tue Nov 24 15:53:07 2026 +0800
testing/ostest: use WDOG_MAX_DELAY for the maximum wdog delay test
The "maximum delay" case hard-coded the expanded value (CLOCK_MAX >> 2)
that WDOG_MAX_DELAY used to have. Reference the macro instead so the
test follows the wdog contract even when the kernel redefines the
maximum (for example when the watchdog is backed by an hrtimer whose
limit is HRTIMER_MAX_DELAY / NSEC_PER_TICK).
Assisted-By: mimo-v2.6-pro
Signed-off-by: ouyangxiangzhen <[email protected]>
---
testing/ostest/wdog.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/testing/ostest/wdog.c b/testing/ostest/wdog.c
index 5f33320a8..4a4928fc3 100644
--- a/testing/ostest/wdog.c
+++ b/testing/ostest/wdog.c
@@ -308,8 +308,7 @@ static void wdog_test_run(FAR wdtest_param_t *param)
/* Maximum */
- delay = CLOCK_MAX >> 2;
- delay -= 1;
+ delay = WDOG_MAX_DELAY;
wdtest_assert(wd_start(&test_wdog, delay,
wdtest_callback, (wdparm_t)param) == OK);