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

Fix #1071, Initialize Status in CFE_ES_WaitForSystemState #1115

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fsw/cfe-core/src/es/cfe_es_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ bool CFE_ES_RunLoop(uint32 *RunStatus)
*/
int32 CFE_ES_WaitForSystemState(uint32 MinSystemState, uint32 TimeOutMilliseconds)
{
int32 Status;
int32 Status = CFE_SUCCESS;
CFE_ES_AppRecord_t *AppRecPtr;
uint32 RequiredAppState;
uint32 WaitTime;
Expand Down
8 changes: 8 additions & 0 deletions fsw/cfe-core/unit-test/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,14 @@ void TestStartupErrorPaths(void)
CFE_ES_AppState_LATE_INIT,
"CFE_ES_WaitForSystemState",
"Min System State is CFE_ES_SystemState_APPS_INIT");

/* Test success */
ES_ResetUnitTest();
/* This prep is necessary so GetAppId works */
ES_UT_SetupSingleAppId(CFE_ES_AppType_EXTERNAL, CFE_ES_AppType_CORE, NULL, &AppRecPtr, NULL);
CFE_ES_Global.SystemState = CFE_ES_SystemState_CORE_READY;
ASSERT(CFE_ES_WaitForSystemState(CFE_ES_SystemState_CORE_READY, 0));

}

void TestApps(void)
Expand Down