mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-02 04:39:01 +00:00
test/oneshot:fix oneshot testcase.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
This commit is contained in:
parent
667d03f184
commit
902a1d7ece
1 changed files with 4 additions and 3 deletions
|
|
@ -184,9 +184,10 @@ static void test_case_oneshot(FAR void **state)
|
|||
assert_return_code(ret, OK);
|
||||
|
||||
clock_timespec_subtract(&ts, &trigger_before, ×pec_sub);
|
||||
assert_int_equal(oneshot_state->oneshot.ts.tv_sec,
|
||||
timespec_sub.tv_sec);
|
||||
assert_in_range(timespec_sub.tv_nsec, 0, NSEC_PER_MSEC);
|
||||
assert_in_range(timespec_sub.tv_sec,
|
||||
oneshot_state->oneshot.ts.tv_sec - 1,
|
||||
oneshot_state->oneshot.ts.tv_sec);
|
||||
assert_in_range(timespec_sub.tv_nsec, 0, NSEC_PER_SEC);
|
||||
}
|
||||
|
||||
ret = ioctl(fd, OSIOC_START, &oneshot_state->oneshot);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue