Skip to content
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

Unit test status code discrepancies in osapi-timebase.h #1022

Closed
18 tasks
jphickey opened this issue May 12, 2021 · 2 comments · Fixed by #1051 or #1058
Closed
18 tasks

Unit test status code discrepancies in osapi-timebase.h #1022

jphickey opened this issue May 12, 2021 · 2 comments · Fixed by #1051 or #1058
Assignees
Labels
unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The unit tests and API documentation should match, where all status codes in the API documentation are tested in a unit test, and likewise all codes being tested for are documented in the API.

Describe the solution you'd like
Resolve the following mismatches:

NOTE: This API does not have a "unit-tests" program to test these status codes - Hence why they are all flagged as being only in doxygen. The "time-base-api-test" program does exercise many of them, but isn't included in this test run.

File src/os/inc/osapi-timebase.h, function OS_TimeBaseCreate():

  • ONLY IN DOXY: OS_ERR_INCORRECT_OBJ_STATE
  • ONLY IN DOXY: OS_ERR_NAME_TOO_LONG
  • ONLY IN DOXY: OS_INVALID_POINTER

File src/os/inc/osapi-timebase.h, function OS_TimeBaseSet():

  • ONLY IN DOXY: OS_ERR_INCORRECT_OBJ_STATE
  • ONLY IN DOXY: OS_TIMER_ERR_INVALID_ARGS

File src/os/inc/osapi-timebase.h, function OS_TimeBaseDelete():

  • ONLY IN DOXY: OS_ERR_INCORRECT_OBJ_STATE

File src/os/inc/osapi-timebase.h, function OS_TimeBaseGetIdByName():

  • ONLY IN DOXY: OS_ERR_INCORRECT_OBJ_STATE
  • ONLY IN DOXY: OS_ERR_NAME_NOT_FOUND
  • ONLY IN DOXY: OS_ERR_NAME_TOO_LONG
  • ONLY IN DOXY: OS_INVALID_POINTER
  • ONLY IN DOXY: OS_SUCCESS

File src/os/inc/osapi-timebase.h, function OS_TimeBaseGetInfo():

  • ONLY IN DOXY: OS_ERR_INCORRECT_OBJ_STATE
  • ONLY IN DOXY: OS_ERR_INVALID_ID
  • ONLY IN DOXY: OS_INVALID_POINTER
  • ONLY IN DOXY: OS_SUCCESS

File src/os/inc/osapi-timebase.h, function OS_TimeBaseGetFreeRun():

  • ONLY IN DOXY: OS_ERR_INVALID_ID
  • ONLY IN DOXY: OS_INVALID_POINTER
  • ONLY IN DOXY: OS_SUCCESS

Additional context
Originally noted in #331, split into separate work items.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label May 12, 2021
@skliper skliper added this to the 6.0.0 milestone May 12, 2021
@jphickey jphickey self-assigned this May 24, 2021
@jphickey
Copy link
Contributor Author

Plan is to add these functions into the "ostimer-test" unit-test to verify the return codes of these routines.

@jphickey
Copy link
Contributor Author

Correction/Update - after closer consideration, since many of these return values are actually checked in the "time-base-api-test" program, preferable approach is to avoid unnecessary duplication. Will update the cross reference set to include these test cases, rather than duplicating many of them in "unit-tests".

jphickey added a commit to jphickey/osal that referenced this issue May 24, 2021
Ensures correlation between the test cases and documented return
values for the OSAL timebase API.
jphickey added a commit to jphickey/osal that referenced this issue May 24, 2021
Ensures correlation between the test cases and documented return
values for the OSAL timebase API.
jphickey added a commit to jphickey/osal that referenced this issue May 26, 2021
Ensures correlation between the test cases and documented return
values for the OSAL timebase API.
jphickey added a commit to jphickey/osal that referenced this issue May 26, 2021
Ensures correlation between the test cases and documented return
values for the OSAL timebase API.
astrogeco added a commit that referenced this issue Jun 2, 2021
Fix #1022, resolve discrepancies between timebase API and unit tests
pepepr08 pushed a commit to pepepr08/osal that referenced this issue Jun 9, 2021
Ensures correlation between the test cases and documented return
values for the OSAL timebase API.
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
2 participants