Skip to content

[NAV#707] Fix SC unit tests to work with large SC_PACKET_MAX_SIZE#171

Closed
thesamprice wants to merge 1 commit into
nasa:draco-rc5-evalfrom
thesamprice:707-sc-unit-test-fixes
Closed

[NAV#707] Fix SC unit tests to work with large SC_PACKET_MAX_SIZE#171
thesamprice wants to merge 1 commit into
nasa:draco-rc5-evalfrom
thesamprice:707-sc-unit-test-fixes

Conversation

@thesamprice

Copy link
Copy Markdown
  • SC_LoadAts_Test_AtsEntryOverflow: Use fixed 256-byte message size to prevent stack buffer overflow
  • SC_UpdateAppend_Test_CmdDoesNotFitBuffer: Use dynamic values based on MaxBufEntries
  • SC_UpdateAppend_Test_EndOfBuffer: Fix word count calculation for variable-sized entries

These fixes make the tests robust against SC_PACKET_MAX_SIZE values up to 4096 bytes. All 150 unit tests now pass.

Checklist (Please check before submitting)

Describe the contribution
A clear and concise description of what the contribution is.

  • Include explicitly what issue it addresses [e.g. Fixes #X]

Testing performed
Steps taken to test the contribution:

  1. Build steps '...'
  2. Execution steps '...'

Expected behavior changes
A clear and concise description of how this contribution will change behavior and level of impact.

  • API Change: xxx (if applicable)
  • Behavior Change: xxx (if applicable)
  • Or no impact to behavior

System(s) tested on

  • Hardware: [e.g. PC, SP0, MCP750]
  • OS: [e.g. Ubuntu 18.04, RTEMS 4.11, VxWorks 6.9]
  • Versions: [e.g. cFE 6.6, OSAL 4.2, PSP 1.3 for mcp750, any related apps or tools]

Additional context
Add any other context about the contribution here.

Third party code
If included, identify any third party code and provide text file of license

Contributor Info - All information REQUIRED for consideration of pull request
Full name and company/organization/center of all contributors ("Personal" if individual work)

  • Note CLA's apply to software contributions.

- SC_LoadAts_Test_AtsEntryOverflow: Use fixed 256-byte message size to prevent stack buffer overflow
- SC_UpdateAppend_Test_CmdDoesNotFitBuffer: Use dynamic values based on MaxBufEntries
- SC_UpdateAppend_Test_EndOfBuffer: Fix word count calculation for variable-sized entries

These fixes make the tests robust against SC_PACKET_MAX_SIZE values up to 4096 bytes.
All 150 unit tests now pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants