Skip to content
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
3 changes: 1 addition & 2 deletions fsw/src/fm_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ int32 FM_AppInit(void)

if (Result != CFE_SUCCESS)
{
CFE_EVS_SendEvent(FM_STARTUP_EVENTS_ERR_EID, CFE_EVS_EventType_ERROR,
"%s register for event services: result = 0x%08X", ErrText, (unsigned int)Result);
CFE_ES_WriteToSysLog("FM App: Error registering for Event Services, RC = 0x%08X\n", (unsigned int)Result);
}
else
{
Expand Down
10 changes: 3 additions & 7 deletions unit-test/fm_app_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ void Test_FM_AppMain_AppInitNotSuccess(void)

/* Assert */
UtAssert_STUB_COUNT(CFE_ES_RunLoop, 1);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_STUB_COUNT(CFE_ES_WriteToSysLog, 2);
UtAssert_STUB_COUNT(CFE_ES_ExitApp, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_STARTUP_EVENTS_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_EXIT_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[1].EventID, FM_EXIT_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[1].EventType, CFE_EVS_EventType_ERROR);
}

void Test_FM_AppMain_SBReceiveBufferDefaultOption(void)
Expand Down Expand Up @@ -242,9 +241,6 @@ void Test_FM_AppInit_EVSRegisterNotSuccess(void)

/* Assert */
UtAssert_STUB_COUNT(CFE_EVS_Register, 1);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_STARTUP_EVENTS_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
}

void Test_FM_AppInit_CreatePipeFail(void)
Expand Down
8 changes: 5 additions & 3 deletions unit-test/fm_child_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,9 +1683,11 @@ void Test_FM_ChildDirListPktCmd_DirListOffsetNotExceeded(void)
FM_DirListPkt_Payload_t *ReportPtr;

/* Arrange */
FM_ChildQueueEntry_t queue_entry = {
.CommandCode = FM_GET_DIR_LIST_PKT_CC, .Source1 = "dummy_source1", .Source2 = "dummy_source2", .DirListOffset = 1};
os_dirent_t direntry = {.FileName = "filename"};
FM_ChildQueueEntry_t queue_entry = {.CommandCode = FM_GET_DIR_LIST_PKT_CC,
.Source1 = "dummy_source1",
.Source2 = "dummy_source2",
.DirListOffset = 1};
os_dirent_t direntry = {.FileName = "filename"};

UT_SetDeferredRetcode(UT_KEY(OS_DirectoryRead), 2, !OS_SUCCESS);
UT_SetDataBuffer(UT_KEY(OS_DirectoryRead), &direntry, sizeof(direntry), false);
Expand Down