-
Notifications
You must be signed in to change notification settings - Fork 203
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
Incomplete coverage test for cfe_es_task.c #468
Comments
I think cFE/modules/es/fsw/src/cfe_es_task.c Lines 796 to 820 in 9d4fcae
They ultimately use the same macro |
Likely intended to be able to support a smaller |
Test the following cases: - CFE_ES_TaskMain() with a CFE_ES_TaskInit() error - Query tasks command with valid lib ID - Error when sending Build Info event - CFE_ES_GenerateVersionEvents() error when sending mission event - Loop coverage for CFE_ES_FindConfigKeyValue()
Test the following cases: - CFE_ES_TaskMain() with a CFE_ES_TaskInit() error - Query tasks command with valid lib ID - Error when sending Build Info event - CFE_ES_GenerateVersionEvents() error when sending mission event - Loop coverage for CFE_ES_FindConfigKeyValue()
Test the following cases: - CFE_ES_TaskMain() with a CFE_ES_TaskInit() error - Query tasks command with valid lib ID - Error when sending Build Info event - CFE_ES_GenerateVersionEvents() error when sending mission event - Loop coverage for CFE_ES_FindConfigKeyValue()
Test the following cases: - CFE_ES_TaskMain() with a CFE_ES_TaskInit() error - Query tasks command with valid lib ID - Error when sending Build Info event - CFE_ES_GenerateVersionEvents() error when sending mission event - Loop coverage for CFE_ES_FindConfigKeyValue()
See #1652 |
Testing these lines requires modifying GLOBAL_CONFIGDATA, which is const. The PSP repo defines this global (in ut_psp_stubs.c). Even if modified to add cover this lines, then we wouldn't be able to cover the branch case when the values are NULL. ut_psp_stubs.c
|
Test the following cases: - CFE_ES_TaskMain() with a CFE_ES_TaskInit() error - Query tasks command with valid lib ID - Error when sending Build Info event - CFE_ES_GenerateVersionEvents() error when sending mission event - Loop coverage for CFE_ES_FindConfigKeyValue()
Testing the non NULL case on this function requires access to this internal-only function. Possible solutions to test these lines is to add:
In es_UT.c:
|
See nasa/PSP#298 for supporting override of |
Test the following cases: - CFE_ES_TaskMain() with a CFE_ES_TaskInit() error - Query tasks command with valid lib ID - Error when sending Build Info event - CFE_ES_GenerateVersionEvents() error when sending mission event - Loop coverage for CFE_ES_FindConfigKeyValue()
Fix #468, Adding coverage for cfe_es_task.c
Is your feature request related to a problem? Please describe.
Missing code coverage for the following:
CFE_ES_TaskInit
363 0 : snprintf(EventBuffer, sizeof(EventBuffer), "Mission %s", GLOBAL_CONFIGDATA.Config);
CFE_ES_HousekeepingCmd
Requester Info
Anh Van, NASA Goddard
The text was updated successfully, but these errors were encountered: