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-clock.h #1009

Closed
3 tasks done
jphickey opened this issue May 12, 2021 · 0 comments · Fixed by #1029 or #1058
Closed
3 tasks done

Unit test status code discrepancies in osapi-clock.h #1009

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

Comments

@jphickey
Copy link
Contributor

jphickey commented May 12, 2021

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-clock.h, function OS_GetLocalTime():

  • OK: OS_INVALID_POINTER
  • ONLY IN TEST: OS_SUCCESS

File src/os/inc/osapi-clock.h, function OS_SetLocalTime():

  • ONLY IN DOXY: OS_INVALID_POINTER

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

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this May 12, 2021
@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 added a commit to jphickey/osal that referenced this issue May 19, 2021
Note that the success case for OS_SetLocalTime is tested,
but is marked as a MIR test case because it requires
elevated permission, it is expected to fail when running
as a normal user on Linux.
jphickey added a commit to jphickey/osal that referenced this issue May 21, 2021
Note that the success case for OS_SetLocalTime is tested,
but is marked as a MIR test case because it requires
elevated permission, it is expected to fail when running
as a normal user on Linux.
astrogeco added a commit that referenced this issue Jun 1, 2021
pepepr08 pushed a commit to pepepr08/osal that referenced this issue Jun 9, 2021
Note that the success case for OS_SetLocalTime is tested,
but is marked as a MIR test case because it requires
elevated permission, it is expected to fail when running
as a normal user on Linux.
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
- Documentation updates for applying the alignment pattern
- Added Cmd to all command types
- Updated example code
- Converted Syslog to SysLog for consistency
- CFE_SB_RcvMsg now CFE_SB_ReceiveBuffer
- Replaced references to deprecated CFE_SB API's with MSG API's
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
- CFE_MSG_Message_t no longer worst case alignment
- CFE_MSG_CommandHeader_t and CFE_MSG_TelemetryHeader_t now
  contain the base message type, CFE_MSG_Message_t
- Fixed size type issue in CFE_MSG_ComputeChecksum
- Replaced CFE_SB_TlmHdr_t and CFE_SB_CmdHdr_t with
  CFE_MSG_CommandHeader_t and CFE_MSG_TelemetryHeader_t
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
- Using CFE_SB_Buffer_t where appropriate
- Replaced CFE_SB_CMD_HDR_SIZE and CFE_SB_TLM_HDR_SIZE
  with sizeof the appropriate type
- Deprecated CFE_SB_SendMsg, CFE_SB_RcvMsg stubs
- Added CFE_SB_TransmitBuffer, CFE_SB_TransmitMsg, and
  CFE_SB_ReceiveBuffer stubs
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
- Replaced CFE_SB_SendMsg and CFE_SB_PassMsg with CFE_SB_TransmitMsg
- Replaced CFE_SB_ZeroCopySend and CFE_SB_ZeroCopyPass with
  CFE_SB_TransmitBuffer
- Replaced CFE_SB_RcvMsg with CFE_SB_ReceiveBuffer
- Used CFE_SB_Buffer_t and CFE_MSG_Message_t where appropriate
- Added Cmd to all command types
- Changed Syslog to SysLog for consistency
- Removed "see also" blocks in documentation, APIs are already grouped
  and these typically don't add anything useful (simplifies maintenance)
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
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
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