-
Notifications
You must be signed in to change notification settings - Fork 654
testing/ostest: add hrtimer API functional tests #3248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
80d315e to
cc4ee26
Compare
anchao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @wangchdo :-)
This PR should be merged after apache/nuttx#17489.
cc4ee26 to
fd72386
Compare
|
tests updated according to updated in apache/nuttx#17489 |
cederom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @wangchdo :-)
fd72386 to
f2f9eac
Compare
|
@anchao @cederom @xiaoxiang781216 @linguini1 @simbit18 HRTimer tests have been updated according to @xiaoxiang781216's comments. The improvements include:
The ostest has passed on real hardware (a2g-tc397-5v-tft) for two consecutive runs. |
Add functional tests for the newly added hrtimer APIs, including hrtimer_init(), hrtimer_start(), and hrtimer_cancel(). Signed-off-by: Chengdong Wang <[email protected]>
f2f9eac to
56e2ed7
Compare
cederom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @wangchdo for the great work and @xiaoxiang781216 for valuable remarks! :-)
| HRTIMER_TEST(NSEC_PER_500MS > diff - NSEC_MARGIN, true); | ||
| } | ||
|
|
||
| test->previous = test->now; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change now to local variable
|
|
||
| /* Stop the test after 15 expirations */ | ||
|
|
||
| if (test->count >= 15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (test->count >= 15) | |
| if (test->count >= 15) |
Summary
Add functional tests for the newly added hrtimer APIs,
including hrtimer_init(), hrtimer_start(), and hrtimer_cancel().
Impact
This PR depends on apache/nuttx#17489
Testing
ostest passed on a2g-tc397-5v-tft with hrtimer enalbed