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 uncovered code cfe_es_api.c, CFE_ES_ExitApp infinite loop (spins until deleted) #1628

Open
pepepr08 opened this issue Jun 16, 2021 · 2 comments

Comments

@pepepr08
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Missing coverage for CFE_ES_ExitApp function that contains an infinite loop.

else /* It is an external App */
{
CFE_ES_SysLogWrite_Unsync("%s: Application %s called CFE_ES_ExitApp\n", __func__,
CFE_ES_AppRecordGetName(AppRecPtr));
AppRecPtr->AppState = CFE_ES_AppState_STOPPED;
/*
** Unlock the ES Shared data before suspending the app
*/
CFE_ES_UnlockSharedData(__func__, __LINE__);
/*
** Suspend the Application until ES kills it.
** It might be better to have a way of suspending the app in the OS
*/
while (1)
{
OS_TaskDelay(500);
}

Describe the solution you'd like
Add coverage tests to include part of the function that is currently not being tested.

Describe alternatives you've considered
None.

Requester Info
Jose F. Martinez Pedraza/NASA GSFC

@skliper
Copy link
Contributor

skliper commented Jun 16, 2021

Maybe make the while loop dependent on system state instead of while(1), then it could be tested normally.

@skliper skliper changed the title Add code coverage test for infinite loop in cfe_es_api.c, CFE_ES_ExitApp ES uncovered code cfe_es_api.c, CFE_ES_ExitApp infinite loop (spins until deleted) Aug 27, 2021
@avan989
Copy link
Contributor

avan989 commented Jun 12, 2023

code coverage is not possible without entering an infinite loop.

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