You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There aren't default handlers for all APIs that set parameters, leading to potential uninitialized variables when unit testing code that expects the parameter to be set if guaranteed by the API.
Describe the solution you'd like
For API's that initialize/set id's or really any other case where the parameter should always be set there should be a default handler to avoid uninitialized variable issues for the code under test.
Example of a missing handler - CFE_ES_CreateChildTask. At minimum for success the id should be set valid.
Describe alternatives you've considered
Initialize the passed in parameter, but when initialized to invalid if there isn't a handler to set it for the valid case the test will fail. It's better than the often silent uninitialized variable issue but for APIs that always set the parameter the burden shouldn't be on the flight code to fix the test issue.
Additional context
Planning to spawn individual issues based on identified cases, but this issue relates to a full scrub.
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There aren't default handlers for all APIs that set parameters, leading to potential uninitialized variables when unit testing code that expects the parameter to be set if guaranteed by the API.
Describe the solution you'd like
For API's that initialize/set id's or really any other case where the parameter should always be set there should be a default handler to avoid uninitialized variable issues for the code under test.
Example preferred handler:
cFE/modules/core_api/ut-stubs/src/cfe_es_handlers.c
Lines 124 to 151 in 99429bf
Example of a missing handler -
CFE_ES_CreateChildTask
. At minimum for success the id should be set valid.Describe alternatives you've considered
Initialize the passed in parameter, but when initialized to invalid if there isn't a handler to set it for the valid case the test will fail. It's better than the often silent uninitialized variable issue but for APIs that always set the parameter the burden shouldn't be on the flight code to fix the test issue.
Additional context
Planning to spawn individual issues based on identified cases, but this issue relates to a full scrub.
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: