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

TBL: CFE_TBL_Register branch coverage requires alternate configuration #1898

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

Comments

@skliper
Copy link
Contributor

skliper commented Aug 26, 2021

Is your feature request related to a problem? Please describe.
Hitting the condition below would require CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE > CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE, with a single buffer table and size between the two settings (shouldn't create the system log message)

     112 [ +  + ][ +  - ]:        172 :             else if ((Size > CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE) &&
     113                 :          1 :                      ((TblOptionFlags & CFE_TBL_OPT_BUFFER_MSK) == CFE_TBL_OPT_DBL_BUFFER))
     114                 :            :             {
     115                 :          1 :                 Status = CFE_TBL_ERR_INVALID_SIZE;
     116                 :            : 
     117                 :          1 :                 CFE_ES_WriteToSysLog("%s: Dbl Buffered Table '%s' has size %d > %d\n", __func__, Name, (int)Size,
     118                 :            :                                      CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE);
     119                 :            :             }

else if ((Size > CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE) &&
((TblOptionFlags & CFE_TBL_OPT_BUFFER_MSK) == CFE_TBL_OPT_DBL_BUFFER))
{
Status = CFE_TBL_ERR_INVALID_SIZE;
CFE_ES_WriteToSysLog("%s: Dbl Buffered Table '%s' has size %d > %d\n", __func__, Name, (int)Size,
CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE);
}

Describe the solution you'd like
Add multiple builds in CI with alternate settings to include this config.

Describe alternatives you've considered
Could manually cover.

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@avan989
Copy link
Contributor

avan989 commented Jun 7, 2023

The current configuration: CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE == CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE.

To hit the targeted condition would require:

  1. Size > CFE_PLATFORM_TBL_MAX_DBL_TABLE_SIZE
  2. !CFE_TBL_OPT_DBL_BUFFER /* Which is really CFE_TBL_OPT_SNGL_BUFFER since there are only two options (0 or 1) */

If the targeted condition was met, it would trigger the else-if condition above it. Code coverage is not possible without changing the configuration or rewriting the code.

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