From 94360e72b8e1868e290044777271385b211041dc Mon Sep 17 00:00:00 2001 From: ArielSAdamsNASA Date: Fri, 13 Aug 2021 10:50:39 -0500 Subject: [PATCH 1/2] Fix #1786, Success Test for CFE_ES_RestartApp --- modules/es/ut-coverage/es_UT.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/es/ut-coverage/es_UT.c b/modules/es/ut-coverage/es_UT.c index ca7156b5c..4a4614290 100644 --- a/modules/es/ut-coverage/es_UT.c +++ b/modules/es/ut-coverage/es_UT.c @@ -3522,6 +3522,11 @@ void TestAPI(void) AppId = CFE_ES_APPID_C(ES_UT_MakeAppIdForIndex(99999)); UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_ES_ERR_RESOURCEID_NOT_VALID); + /* Test successfully restarting an app */ + ES_ResetUnitTest(); + AppId = CFE_ES_AppRecordGetID(UtAppRecPtr); + UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_SUCCESS); + /* Test CFE_ES_ReloadApp with bad AppID argument */ ES_ResetUnitTest(); UtAssert_INT32_EQ(CFE_ES_ReloadApp(CFE_ES_APPID_UNDEFINED, "filename"), CFE_ES_ERR_RESOURCEID_NOT_VALID); From 901f1351ed3aa8ff553d93de539a8ccff9e441f3 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Tue, 17 Aug 2021 18:27:00 +0000 Subject: [PATCH 2/2] Fix #1786, Set up app and apply format for Restart App UT --- modules/es/ut-coverage/es_UT.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/es/ut-coverage/es_UT.c b/modules/es/ut-coverage/es_UT.c index 4a4614290..2bc9b25ac 100644 --- a/modules/es/ut-coverage/es_UT.c +++ b/modules/es/ut-coverage/es_UT.c @@ -3522,9 +3522,10 @@ void TestAPI(void) AppId = CFE_ES_APPID_C(ES_UT_MakeAppIdForIndex(99999)); UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_ES_ERR_RESOURCEID_NOT_VALID); - /* Test successfully restarting an app */ + /* Test successfully restarting an app */ ES_ResetUnitTest(); - AppId = CFE_ES_AppRecordGetID(UtAppRecPtr); + ES_UT_SetupSingleAppId(CFE_ES_AppType_EXTERNAL, CFE_ES_AppState_RUNNING, NULL, &UtAppRecPtr, NULL); + AppId = CFE_ES_AppRecordGetID(UtAppRecPtr); UtAssert_INT32_EQ(CFE_ES_RestartApp(AppId), CFE_SUCCESS); /* Test CFE_ES_ReloadApp with bad AppID argument */