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

ES missing branch coverage in CFE_ES_RunPerfLogDump, condition not possible #1933

Closed
skliper opened this issue Sep 5, 2021 · 1 comment · Fixed by #2330
Closed

ES missing branch coverage in CFE_ES_RunPerfLogDump, condition not possible #1933

skliper opened this issue Sep 5, 2021 · 1 comment · Fixed by #2330

Comments

@skliper
Copy link
Contributor

skliper commented Sep 5, 2021

Is your feature request related to a problem? Please describe.
There's no way for the current state to not be < CFE_ES_PerfDumpState_CLEANUP:

     481         [ +  - ]:          1 :                     if (State->CurrentState < CFE_ES_PerfDumpState_CLEANUP)
     482                 :            :                     {
     483                 :          1 :                         State->PendingState = CFE_ES_PerfDumpState_CLEANUP;
     484                 :            :                     }

here:

/* skip to cleanup */
if (State->CurrentState < CFE_ES_PerfDumpState_CLEANUP)
{
State->PendingState = CFE_ES_PerfDumpState_CLEANUP;
}

Describe the solution you'd like
Maybe this is an artifact of a previous implementation? Really could just set the pending state to cleanup.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@avan989
Copy link
Contributor

avan989 commented Jun 13, 2023

code coverage is not possible.

To enter this code block requires the BlockSize != 0. The only way for the BlockSize != 0 is if the State->CurrentState is ...HDR, ...METADATA, ... ENTRIES. Each of those "STATE" is less than "CFE_ES_PerfDumpState_CLEANUP". Not possible to make the non-success case for the if statement.

thnkslprpt added a commit to thnkslprpt/cFE that referenced this issue Jul 18, 2023
dzbaker added a commit that referenced this issue Feb 23, 2024
…in-CFE_ES_RunPerfLogDump

Fix #1933, Remove unreachable/dead branch in CFE_ES_RunPerfLogDump()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants