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 #2228, Update UTs to use correct cmd types #2229

Merged
merged 2 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions modules/es/ut-coverage/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ void ES_ResetUnitTest(void)
* so it must be re-initialized here every time CFE_ES_Global is reset.
*/
CFE_ES_Global.ResetDataPtr = ES_UT_PersistentResetData;
}
} /* end ES_ResetUnitTest() */

void TestInit(void)
{
Expand Down Expand Up @@ -2466,7 +2466,7 @@ void TestTask(void)
union
{
CFE_MSG_Message_t Msg;
CFE_MSG_CommandHeader_t NoArgsCmd;
CFE_ES_NoArgsCmd_t NoArgsCmd;
jphickey marked this conversation as resolved.
Show resolved Hide resolved
CFE_ES_ClearSysLogCmd_t ClearSysLogCmd;
CFE_ES_ClearERLogCmd_t ClearERLogCmd;
CFE_ES_ResetPRCountCmd_t ResetPRCountCmd;
Expand Down Expand Up @@ -3518,7 +3518,7 @@ void TestTask(void)
UT_SetHandlerFunction(UT_KEY(CFE_Config_IterateAll), ES_UT_Config_IterateAll, NULL);
UtAssert_VOIDCALL(CFE_ES_TaskInit());
CFE_UtAssert_PRINTF("Error sending mission version event");
}
} /* end TestTask */

void TestPerf(void)
{
Expand Down Expand Up @@ -5014,7 +5014,7 @@ void TestCDS()
CFE_ES_Global.CDSIsAvailable = false;
UtAssert_INT32_EQ(CFE_ES_GetCDSBlockIDByName(&CDSHandle, "NotNULL"), CFE_ES_NOT_IMPLEMENTED);
UtAssert_INT32_EQ(CFE_ES_GetCDSBlockName(CDSName, CDSHandle, sizeof(CDSName)), CFE_ES_NOT_IMPLEMENTED);
}
} /* End TestCDS */

void TestCDSMempool(void)
{
Expand Down
6 changes: 3 additions & 3 deletions modules/evs/ut-coverage/evs_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ void Test_Logging(void)
char tmpString[100];
union
{
CFE_MSG_CommandHeader_t cmd;
CFE_EVS_NoopCmd_t cmd;
CFE_EVS_SetLogModeCmd_t modecmd;
CFE_EVS_WriteLogDataFileCmd_t logfilecmd;
} CmdBuf;
Expand Down Expand Up @@ -1056,7 +1056,7 @@ void Test_WriteApp(void)
{
union
{
CFE_MSG_CommandHeader_t cmd;
CFE_EVS_ResetCountersCmd_t cmd;
CFE_EVS_WriteAppDataFileCmd_t AppDataCmd;
CFE_EVS_AppNameBitMaskCmd_t appbitcmd;
} CmdBuf;
Expand Down Expand Up @@ -1993,7 +1993,7 @@ void Test_Misc(void)
union
{
CFE_MSG_Message_t msg;
CFE_MSG_CommandHeader_t cmd;
CFE_EVS_NoArgsCmd_t cmd;
jphickey marked this conversation as resolved.
Show resolved Hide resolved
CFE_EVS_SetLogModeCmd_t modecmd;
CFE_EVS_WriteLogDataFileCmd_t writelogdatacmd;
} PktBuf;
Expand Down
4 changes: 2 additions & 2 deletions modules/tbl/ut-coverage/tbl_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ void Test_CFE_TBL_TaskInit(void)
uint32 ExitCode;
union
{
CFE_MSG_CommandHeader_t NoArgsCmd;
CFE_MSG_Message_t Msg;
CFE_TBL_NoArgsCmd_t NoArgsCmd;
jphickey marked this conversation as resolved.
Show resolved Hide resolved
CFE_MSG_Message_t Msg;
} CmdBuf;
CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID;
CFE_MSG_FcnCode_t FcnCode = 0;
Expand Down
7 changes: 4 additions & 3 deletions modules/time/ut-coverage/time_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ void Test_PipeCmds(void)
/* Test sending the no-op command */
UT_InitData();
memset(&CmdBuf, 0, sizeof(CmdBuf));
UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_CMD_NOOP_CC);
UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.noopcmd), UT_TPID_CFE_TIME_CMD_NOOP_CC);
CFE_UtAssert_EVENTSENT(CFE_TIME_NOOP_EID);

/* Noop with bad size */
Expand All @@ -1416,7 +1416,8 @@ void Test_PipeCmds(void)
CFE_TIME_Global.LocalIntCounter = 1;
CFE_TIME_Global.LocalTaskCounter = 1;
memset(&CmdBuf, 0, sizeof(CmdBuf));
UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_CMD_RESET_COUNTERS_CC);
UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.resetcountercmd),
UT_TPID_CFE_TIME_CMD_RESET_COUNTERS_CC);
CFE_UtAssert_EVENTSENT(CFE_TIME_RESET_EID);

/* Confirm error counters get reset to help cover requirements that are difficult operationally */
Expand All @@ -1443,7 +1444,7 @@ void Test_PipeCmds(void)
/* Test sending the request diagnostics command */
UT_InitData();
memset(&CmdBuf, 0, sizeof(CmdBuf));
UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd),
UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.diagtlmcmd),
UT_TPID_CFE_TIME_CMD_SEND_DIAGNOSTIC_TLM_CC);
CFE_UtAssert_EVENTSENT(CFE_TIME_DIAG_EID);

Expand Down