-
Notifications
You must be signed in to change notification settings - Fork 3k
Update of RTC HAL API specification and tests. #5306
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
Update of RTC HAL API specification and tests. #5306
Conversation
cf1a596
to
38566b7
Compare
Build : FAILUREBuild number : 148 |
ae871bf
to
b8b1416
Compare
Added conditional compilation: sleep/deep-sleep tests available only for boards with low power timers. |
Build : SUCCESSBuild number : 155 Triggering tests/test mbed-os |
I'm not sure if this is failure reason, but in Travis log I have found only this error:
|
@mprse I can see in the logs that doxygen check is red, that would be the failure, can you confirm? |
b8b1416
to
1ea37cd
Compare
Thanks for the tip. It looks like there is some problem with doxygen formatting. |
Travis still fails |
a6b2b8f
to
a95d01a
Compare
Build : SUCCESSBuild number : 266 Skipping test trigger, missing label 'NEED CI' |
@mprse I restarted travis but we saw the failure regarding doxygen as previously reported. |
a0bc0f8
to
2aad555
Compare
Provided fix. |
hal/rtc_api.h
Outdated
@@ -30,37 +30,147 @@ extern "C" { | |||
#endif | |||
|
|||
/** | |||
* \defgroup hal_rtc RTC hal functions | |||
* \defgroup hal_rtc RTC hal |
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.
We are duplicating or even triplicating(?) if we count PG. I don't think this information should be in test header: defined/undefined behaviour + potential bugs could be only here.
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.
This form has been provided here:
0a68abd PR #5226
And this PR has only extended provided test list.
I understand that we have the same information provided in both files:
rtc_api_tests.h and rtc_api.h (defined/undefined behaviour, potential bugs and list of test cases which verifies each requirement). You suggest to leave here "defined/undefined behaviour + potential bugs" - so only names of test cases should be removed? Additionally what PG means ?
Edit:
Example fix has been provided.
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.
Ok so your PR has changes that are not yet on branch but will arrive in #5226? In this case lets not do that before the other PR is merged somewhere cause we don't know what we are reviewing.
hal/rtc_api.h
Outdated
* @{ | ||
*/ | ||
|
||
/** | ||
* \defgroup hal_rtc_tests RTC hal tests |
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.
That's already defined in test header, i don't think we need this block here.
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.
Fixed.
hal/rtc_api.h
Outdated
* | ||
* @note This function is safe to call repeatedly - Tested by ::rtc_init_test | ||
* | ||
* Pseudo Code: |
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.
Can we comment on each of the example code, that's example implementation pseudo code, just to make it clear.
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.
Fixed.
hal/rtc_api.h
Outdated
/** Initialize the RTC peripheral | ||
* | ||
* Powerup the RTC in perpetration for access. This function must be called | ||
* before any other RTC functions ares called. This does not change the state |
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.
Do we test that that actually does not change the state? Eg does not reset the counter?
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.
rtc_persist_test()
test case verifies if counter value is valid after free and re-initialisation (still counts).
2aad555
to
08734f1
Compare
@bulislaw can you take a look at the update please ? |
08734f1
to
afb2d5c
Compare
/morph build |
Build : SUCCESSBuild number : 429 Triggering tests/morph test |
Test : SUCCESSBuild number : 221 |
Exporter Build : FAILUREBuild number : 78 |
There was a problem only on K66F platform/make_iar. It looks like this is some kind of environment configuration issue.
|
/morph export-build |
Exporter Build : FAILUREBuild number : 84 |
I reviewed the 2 failures from exporters. This is the error reported from IAR: I'll run one exporter in another PR and do a local as well. @mprse If you can test locally also if you can reproduce the failure with IAR here. I haven't seen this report in any other PR so far. |
FYI, https://mbed-os.mbedcloudtesting.com/job/exporter-build-matrix/86/ - latest run on another PR that is going to master and all OK. |
/morph export-build |
Aborting the exporter test for this PR. |
d312da9
to
5e6c46e
Compare
Provide minor fixes for existing test cases. Add additional test cases.
afb2d5c
to
df26cab
Compare
Rebased mprse:feature-hal-spec-rtc_tests-update branch to ARMmbed:feature-hal-spec-rtc. |
/morph build |
Build : SUCCESSBuild number : 492 Triggering tests/morph test |
Test : SUCCESSBuild number : 310 |
Exporter Build : SUCCESSBuild number : 113 |
Description
This patch provides updates of artefacts provided in PR #5226.
This patch provides the following updates:
Status
READY
Migrations
NO
Related PRs
feature-hal-spec-rtc | #5226
master | #5363
Todos
Provided additional test case rtc_enabled_test() is in conflict with rtc_persist_test() test case.
Documentation describes rtc_isenabled() function as follows:
I assume that some test should be created for this function, but its behaviour is unclear. I understand this description as follows:
"RTC is counting" - RTC has been initialised by means of rtc_init() function.
"RTC has the time set" - RTC time value has been set by means of rtc_write() function.
Since rtc_isenabled() can not be called before rtc_init(), test case which checks if rtc_isenabled() returns:
has been created.
This case is inconsistent with test case which checks RTC persistence, which assumes that rtc_isenabled() returns 1 after rtc_init() call (if time has been set earlier).