Skip to content

Commit 6a65402

Browse files
Fix-Pointxiaoxiang781216
authored andcommitted
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 <ouyangxiangzhen@xiaomi.com>
1 parent f6bf8c5 commit 6a65402

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎testing/ostest/wdog.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ static void wdog_test_run(FAR wdtest_param_t *param)
308308

309309
/* Maximum */
310310

311-
delay = CLOCK_MAX >> 2;
312-
delay -= 1;
311+
delay = WDOG_MAX_DELAY;
313312
wdtest_assert(wd_start(&test_wdog, delay,
314313
wdtest_callback, (wdparm_t)param) == OK);
315314

0 commit comments

Comments
 (0)