Skip to content
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

SB line coverage for collision reporting in CFE_SB_SubscribeFull requires alternate config #1916

Open
skliper opened this issue Aug 30, 2021 · 1 comment

Comments

@skliper
Copy link
Contributor

skliper commented Aug 30, 2021

Is your feature request related to a problem? Please describe.
Default config doesn't use the hash implementation, so there's no way to get collisions:

    1129         [ -  + ]:        451 :     if (Collisions != 0)
    1130                 :            :     {
    1131                 :          0 :         CFE_EVS_SendEventWithAppID(CFE_SB_HASHCOLLISION_EID, CFE_EVS_EventType_DEBUG, CFE_SB_Global.AppId,
    1132                 :            :                                    "Msg hash collision: MsgId = 0x%x, collisions = %u",
    1133                 :          0 :                                    (unsigned int)CFE_SB_MsgIdToValue(MsgId), (unsigned int)Collisions);
    1134                 :            :     }

here:

if (Collisions != 0)
{
CFE_EVS_SendEventWithAppID(CFE_SB_HASHCOLLISION_EID, CFE_EVS_EventType_DEBUG, CFE_SB_Global.AppId,
"Msg hash collision: MsgId = 0x%x, collisions = %u",
(unsigned int)CFE_SB_MsgIdToValue(MsgId), (unsigned int)Collisions);
}

Describe the solution you'd like
#1462

Describe alternatives you've considered
None.

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper changed the title SB: line coverage for collision reporting in CFE_SB_SubscribeFull requires alternate config SB line coverage for collision reporting in CFE_SB_SubscribeFull requires alternate config Aug 30, 2021
@avan989
Copy link
Contributor

avan989 commented Jun 9, 2023

Code Coverage is not possible. "Collisions" is always set to 0.
To set collision the following path is taken:

  1. Initialize Collisions = 0 -> CFE_SBR_AddRoute (Not A Stub) -> CFE_SBR_SetRouteId (in cfe_sbr_map_direct.c)

CFE_SBR_SetRouteId is how "collisions" is set but it will always return 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants