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 missing coverage in CFE_SB_AppInit, alternate config but suggested refactor/redesign #1919

Open
skliper opened this issue Aug 31, 2021 · 2 comments

Comments

@skliper
Copy link
Contributor

skliper commented Aug 31, 2021

Is your feature request related to a problem? Please describe.
Uncovered code since it would require an alternate config where CFE_PLATFORM_EVS_MAX_EVENT_FILTERS is less than the defined number of filters:

     190                 :            :     /* Be sure the number of events to register for filtering
     191                 :            :     ** does not exceed CFE_PLATFORM_EVS_MAX_EVENT_FILTERS */
     192         [ -  + ]:         12 :     if (CFE_PLATFORM_EVS_MAX_EVENT_FILTERS < CfgFileEventsToFilter)
     193                 :            :     {
     194                 :          0 :         CfgFileEventsToFilter = CFE_PLATFORM_EVS_MAX_EVENT_FILTERS;
     195                 :            :     

here:

/* Be sure the number of events to register for filtering
** does not exceed CFE_PLATFORM_EVS_MAX_EVENT_FILTERS */
if (CFE_PLATFORM_EVS_MAX_EVENT_FILTERS < CfgFileEventsToFilter)
{
CfgFileEventsToFilter = CFE_PLATFORM_EVS_MAX_EVENT_FILTERS;
} /* end if */

Describe the solution you'd like
Consider refactor of self-filtering, unfriendly to ground management of filters. Generated events shouldn't spam to begin with, and be useful vs requiring self-filtering. Or if this pattern is retained the silent misconfiguration isn't great, could better utilize EVS registration error reporting. Either way this design isn't great. Could get coverage by modifying config, but really it'd just be broken (have user fix config vs silently not doing what the user requested).

Describe alternatives you've considered
See above.

Additional context
#1468

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper changed the title SB missing coverage in CFE_SB_AppInit, alternate config SB missing coverage in CFE_SB_AppInit, alternate config but suggested refactor/redesign Aug 31, 2021
@jphickey
Copy link
Contributor

See also #1669 .... I had also observed this when writing the functional test (can close the other as dupe).

@avan989
Copy link
Contributor

avan989 commented Jun 9, 2023

Code Coverage is not possible without modifying the default configuration. No way to make CFE_PLATFORM_EVS_MAX_EVENT_FILTERS < CfgFileEventsToFilter without changing config.

Currently:

  1. CFE_PLATFORM_EVS_MAX_EVENT_FILTERS is config to 8
  2. CfgFileEventsToFilter is hardcoded to 0.

Reference ticket for the recommended fix.

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

3 participants