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-filesys.h #1014

Closed
30 of 48 tasks
jphickey opened this issue May 12, 2021 · 0 comments · Fixed by #1057 or #1076
Closed
30 of 48 tasks

Unit test status code discrepancies in osapi-filesys.h #1014

jphickey opened this issue May 12, 2021 · 0 comments · Fixed by #1057 or #1076
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:

File src/os/inc/osapi-filesys.h, function OS_FileSysAddFixedMap():

  • ONLY IN DOXY: OS_ERR_NAME_TOO_LONG
  • ONLY IN DOXY: OS_FS_ERR_PATH_TOO_LONG
  • ONLY IN DOXY: OS_INVALID_POINTER

File src/os/inc/osapi-filesys.h, function OS_mkfs():

  • OK: OS_FS_ERR_DEVICE_NOT_FREE
  • ONLY IN DOXY: OS_FS_ERR_DRIVE_NOT_CREATED
  • ONLY IN TEST: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • OK: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_mount():

  • OK: OS_ERR_NAME_NOT_FOUND
  • ONLY IN DOXY: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • ONLY IN TEST: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_initfs():

  • OK: OS_FS_ERR_DEVICE_NOT_FREE
  • ONLY IN DOXY: OS_FS_ERR_DRIVE_NOT_CREATED
  • OK: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • OK: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_rmfs():

  • ONLY IN DOXY: OS_ERROR
  • OK: OS_ERR_NAME_NOT_FOUND
  • ONLY IN DOXY: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • ONLY IN DOXY: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_unmount():

  • ONLY IN DOXY: OS_ERROR
  • OK: OS_ERR_NAME_NOT_FOUND
  • OK: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • OK: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_FileSysStatVolume():

  • ONLY IN DOXY: OS_ERROR
  • OK: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • OK: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_chkfs():

  • ONLY IN DOXY: OS_ERROR
  • ONLY IN DOXY: OS_ERR_NOT_IMPLEMENTED
  • OK: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • ONLY IN DOXY: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_FS_GetPhysDriveName():

  • ONLY IN DOXY: OS_ERROR
  • OK: OS_ERR_NAME_NOT_FOUND
  • OK: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • OK: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_TranslatePath():

  • ONLY IN DOXY: OS_FS_ERR_NAME_TOO_LONG
  • OK: OS_FS_ERR_PATH_INVALID
  • OK: OS_FS_ERR_PATH_TOO_LONG
  • OK: OS_INVALID_POINTER
  • OK: OS_SUCCESS

File src/os/inc/osapi-filesys.h, function OS_GetFsInfo():

  • OK: OS_INVALID_POINTER
  • OK: 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 27, 2021
jphickey added a commit to jphickey/osal that referenced this issue May 27, 2021
Ensures correlation between the test cases and documented return
values for the OSAL filesys API.
astrogeco added a commit that referenced this issue Jun 10, 2021
Fix #1014, resolve discrepancies between filesys API and unit tests
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Test was just a copy/paste of Test_SB_Cmds_CmdUnexpCmdCode
and did not actually implement a new test.  Subscription
reporting is a no parameter command.
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