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-select.h #1019

Closed
4 of 11 tasks
jphickey opened this issue May 12, 2021 · 0 comments · Fixed by #1064 or #1076
Closed
4 of 11 tasks

Unit test status code discrepancies in osapi-select.h #1019

jphickey opened this issue May 12, 2021 · 0 comments · Fixed by #1064 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-select.h, function OS_SelectMultiple():

  • ONLY IN TEST: OS_SUCCESS

File src/os/inc/osapi-select.h, function OS_SelectSingle():

  • OK: OS_INVALID_POINTER
  • ONLY IN TEST: OS_SUCCESS

File src/os/inc/osapi-select.h, function OS_SelectFdZero():

  • OK: OS_INVALID_POINTER
  • ONLY IN TEST: OS_SUCCESS

File src/os/inc/osapi-select.h, function OS_SelectFdAdd():

  • OK: OS_INVALID_POINTER
  • ONLY IN TEST: OS_SUCCESS

File src/os/inc/osapi-select.h, function OS_SelectFdClear():

  • OK: OS_INVALID_POINTER
  • ONLY IN TEST: OS_SUCCESS

File src/os/inc/osapi-select.h, function OS_SelectFdIsSet():

  • ONLY IN DOXY: false
  • ONLY IN DOXY: true

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 28, 2021
jphickey added a commit to jphickey/osal that referenced this issue Jun 1, 2021
Ensures correlation between the test cases and documented return
values for the OSAL select API.

This substantially overhauls the select-test to get better coverage
of the various features.
jphickey added a commit to jphickey/osal that referenced this issue Jun 1, 2021
Ensures correlation between the test cases and documented return
values for the OSAL select API.

This substantially overhauls the select-test to get better coverage
of the various features.
astrogeco added a commit that referenced this issue Jun 10, 2021
Fix #1019, resolve discrepancies between select API and unit tests
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
- Added CFE_SB_TransmitMsg, CFE_SB_TransmitBuffer,
  CFE_SB_ReceiveBuffer (partial nasa#1019 fix)
- Replace CFE_SB_RcvMsg with CFE_SB_ReceiveBuffer
- Deprecated CFE_SB_SendMsg, CFE_SB_PassMsg, CFE_SB_RcvMsg
  CFE_SB_ZeroCopyPass, CFE_SB_ZeroCopySend
- Use CFE_SB_Buffer_t for receiving and casting to command types
- Use CFE_MSG_CommandHeader_t and CFE_MSG_TelemetryHeader_t in
  command and telemetry type definitions
- Use CFE_SB_TransmitMsg to copy the command and telemetry
  into a CFE_SB_Buffer_t and send it where needed
- Avoids need to create send buffers within the app (or union
  the packet types with CFE_SB_Buffer_t)
- Eliminates references to CFE_SB_CmdHdr_t and CFE_SB_TlmHdr_t
  that formerly enforced alignment since these had potential
  to change the actual packet sizes
- No need to cast to CFE_MSG_Message_t anywhere since it's
  available in the CFE_SB_Buffer_t union
- CFE_MSG_Size_t redefined as size_t to simplify future
  transition
- Replaced Syslog with SysLog for consistency
- Added Cmd to all command typedefs
- Replaced CFE_SB_CMD_HDR_SIZE and CFE_SB_TLM_HDR_SIZE
  with sizeof the appropriate type
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