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
skliper
changed the title
SB missing branch coverage in CFE_SB_DeletePipeFull, PendingEventID never 0
SB missing branch coverage in CFE_SB_DeletePipeFull and CFE_SB_SubscribeFull, PendingEventID != 0 when status == CFE_SUCCESS
Aug 30, 2021
skliper
changed the title
SB missing branch coverage in CFE_SB_DeletePipeFull and CFE_SB_SubscribeFull, PendingEventID != 0 when status == CFE_SUCCESS
SB missing branch coverage in CFE_SB_DeletePipeFull, CFE_SB_SubscribeFull, CFE_SB_UnsubscribeFull: PendingEventID != 0 when status == CFE_SUCCESS
Aug 30, 2021
Code coverage is not possible. If Status != CFE_SUCCESS then PendingEventID != 0 (Always set). Recommend just following @skliper solution and use an if/else statement.
This would:
make the branch possible
make it consistence with how the other function implements this part of the code.
Is your feature request related to a problem? Please describe.
PendingEventID is always set, so can't hit false case:
here:
cFE/modules/sb/fsw/src/cfe_sb_api.c
Lines 447 to 450 in 5e41330
Same pattern in CFE_SB_SubscribeFull (although inverted):
here:
cFE/modules/sb/fsw/src/cfe_sb_api.c
Lines 1115 to 1122 in 5e41330
Again in CFE_SB_UnsubscribeFull:
here:
cFE/modules/sb/fsw/src/cfe_sb_api.c
Lines 1310 to 1317 in 5e41330
Describe the solution you'd like
Consider just
else
? Anything that isn't a SUCCESS should increment the error counter.Describe alternatives you've considered
None.
Additional context
None
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: