-
Notifications
You must be signed in to change notification settings - Fork 227
Description
Is your feature request related to a problem? Please describe.
CFE_ES_CleanupTaskResources function contains a hard to reach line (1723 below) that remains untested, preventing us from reaching 100% coverage in file.
-: 1709: /*
-: 1710: ** Delete the task itself
-: 1711: **
-: 1712: ** Note, if the task self exited, then the ID becomes invalid.
-: 1713: ** In this case the OS_ERR_INVALID_ID status is returned, but
-: 1714: ** that is OK, there is nothing else needed to do.
-: 1715: */
74: 1716: Result = OS_TaskDelete(OsalId);
74: 1717: if (Result == OS_SUCCESS || Result == OS_ERR_INVALID_ID)
-: 1718: {
66: 1719: Result = CleanState.OverallStatus;
132: 1720: if (Result == CFE_SUCCESS && CleanState.FoundObjects > 0)
-: 1721: {
-: 1722: /* Objects leftover after cleanup -- resource leak */
#####: 1723: Result = CFE_ES_APP_CLEANUP_ERR;
-: 1724: }
-: 1725: }
Describe the solution you'd like
Add coverage for line to complete 100% coverage in file.
Additional context
It's really difficult to recreate a case were CleanState.FoundObjects is greater than 0 since it always gets set to 0 in while(1)
https://github.com/nasa/cFE/blob/main/modules/es/fsw/src/cfe_es_apps.c#L1667-L1732
Requester Info
Jose F. Martinez Pedraza / NASA GSFC