Skip to content

Commit

Permalink
Fix nasa#2504, UT dispatch table updates
Browse files Browse the repository at this point in the history
Update UT dispatch objects to allow invoking handlers based on
a table lookup rather than configuring the MsgID + CC in the stubs.
  • Loading branch information
jphickey committed Jan 29, 2024
1 parent aa4afad commit fd8b810
Show file tree
Hide file tree
Showing 7 changed files with 396 additions and 208 deletions.
61 changes: 61 additions & 0 deletions modules/core_private/ut-stubs/inc/ut_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,33 @@ typedef struct
void * SnapshotBuffer;
} UT_SoftwareBusSnapshot_Entry_t;

/**
* Style of message dispatch to perform
*/
typedef enum
{
/**
* If method is set to NONE, then no dispatch will be set up.
* This can be used to e.g. check error paths but not actual message handling.
*/
UT_TaskPipeDispatchMethod_NONE,

/**
* If method is set to MSG_ID_CC, then no dispatch will be set up based on the
* MsgID value and command code. This is the traditional method and works with
* task pipe implementations that utilize a local switch() statement.
*/
UT_TaskPipeDispatchMethod_MSG_ID_CC,

/**
* If method is set to TABLE_OFFSET, then no dispatch will be set up based on the
* offset into a dispatch table. This is the EDS method and works with
* task pipe implementations that perform message dispatch via a table lookup.
*/
UT_TaskPipeDispatchMethod_TABLE_OFFSET

} UT_TaskPipeDispatchMethod_t;

/*
* Information to identify a message in the "Task Pipe"
* or message dispatch routines, to indicate which of
Expand All @@ -122,19 +149,53 @@ typedef struct
*/
typedef struct
{
/**
* Method of dispatch to use.
* This should match how the source was compiled,
* and it controls how the stubs are configured.
*/
UT_TaskPipeDispatchMethod_t Method;

/**
* Invoke the handler for this MsgID
* This is only used/relevant when Method is set to MSG_ID_CC
*/
CFE_SB_MsgId_t MsgId;

/**
* Offset of handler function to invoke
* This is only used/relevant when Method is set to TABLE_OFFSET
*/
int32 TableOffset;

/**
* Specifies the sub-command to invoke
* (ignored if the handler does not use command codes,
* set to zero in this case).
*/
CFE_MSG_FcnCode_t CommandCode;

/**
* Set nonzero to indicate a code to be returned from dispatcher.
* This may be relevant for any dispatch method
*/
CFE_Status_t DispatchError;

/**
* Expected size of the message being handled
*/
size_t NominalMsgSize;

} UT_TaskPipeDispatchId_t;

/*
* The following macros set certain fields inside the UT_TaskPipeDispatchId_t
* They can be combined as needed for various situations
*/
#define UT_TPD_SETSIZE(cmd) .NominalMsgSize = sizeof(cmd##_t)
#define UT_TPD_SETCC(cc) .CommandCode = cc
#define UT_TPD_SETERR(err) .DispatchError = err

/*
** Functions
*/
Expand Down
93 changes: 84 additions & 9 deletions modules/core_private/ut-stubs/src/ut_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ static uint16 UT_SendEventAppIDHistory[UT_EVENT_HISTORY_SIZE * 10];

int32 dummy_function(void);

static const UT_EntryKey_t UT_TABLE_DISPATCHER = 0;

/*
** Functions
*/
Expand Down Expand Up @@ -195,6 +197,38 @@ void UT_ResetPoolBufferIndex(void)
UT_SetDataBuffer(UT_KEY(CFE_ES_GetPoolBuf), &UT_CFE_ES_MemoryPool, sizeof(UT_CFE_ES_MemoryPool), false);
}

void UT_DispatchTableHandler(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context)
{
UT_TaskPipeDispatchId_t *DispatchId = UserObj;
const CFE_SB_Buffer_t * Buffer = UT_Hook_GetArgValueByName(Context, "Buffer", const CFE_SB_Buffer_t *);
const void * DispatchTable = UT_Hook_GetArgValueByName(Context, "DispatchTable", const void *);
const uint8 * Addr;
CFE_Status_t (*MsgHandler)(const CFE_SB_Buffer_t *);
CFE_Status_t Status;

MsgHandler = NULL;
UT_Stub_GetInt32StatusCode(Context, &Status);

if (Status == 0 && DispatchId != NULL)
{
Status = DispatchId->DispatchError;

if (DispatchId->Method == UT_TaskPipeDispatchMethod_TABLE_OFFSET && DispatchTable != NULL)
{
Addr = DispatchTable;
Addr += DispatchId->TableOffset;
memcpy(&MsgHandler, Addr, sizeof(void *));
}
}

if (MsgHandler != NULL)
{
Status = MsgHandler(Buffer);
}

UT_Stub_SetReturnValue(FuncKey, Status);
}

/*
** Sets up the MSG stubs in preparation to invoke a "TaskPipe" dispatch function
**
Expand All @@ -204,21 +238,58 @@ void UT_ResetPoolBufferIndex(void)
void UT_SetupBasicMsgDispatch(const UT_TaskPipeDispatchId_t *DispatchReq, CFE_MSG_Size_t MsgSize,
bool ExpectFailureEvent)
{
CFE_Status_t ErrorCode;

if (DispatchReq != NULL)
{
/* Set up for the typical task pipe related calls */
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), (void *)&DispatchReq->MsgId, sizeof(DispatchReq->MsgId), true);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &MsgSize, sizeof(MsgSize), true);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), (void *)&DispatchReq->CommandCode,
sizeof(DispatchReq->CommandCode), true);

/* If a failure event is being set up, also set for MsgId/FcnCode retrieval as part of failure event reporting
*/
if (ExpectFailureEvent)
if (DispatchReq->Method == UT_TaskPipeDispatchMethod_MSG_ID_CC)
{
/* Set up for the typical task pipe related calls */
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), (void *)&DispatchReq->MsgId, sizeof(DispatchReq->MsgId), true);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &MsgSize, sizeof(MsgSize), true);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), (void *)&DispatchReq->CommandCode,
sizeof(DispatchReq->CommandCode), true);
}

if (DispatchReq->Method == UT_TaskPipeDispatchMethod_TABLE_OFFSET)
{
/* If the code uses EDS dispatch, this will invoke the right member function from the table (based on
* offset). This requires setting up the function used for table dispatching first. */
if (UT_TABLE_DISPATCHER == 0)
{
UtAssert_Failed(
"Setup error: Method set to TABLE_OFFSET but table dispatcher function is not configured");
}
else
{
UT_SetHandlerFunction(UT_TABLE_DISPATCHER, UT_DispatchTableHandler, (void *)DispatchReq);
}
}

/* If a failure event is being set up, set for MsgId/FcnCode retrieval as part of failure event reporting */
if (ExpectFailureEvent || DispatchReq->DispatchError != CFE_SUCCESS)
{
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), (void *)&DispatchReq->MsgId, sizeof(DispatchReq->MsgId), true);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &MsgSize, sizeof(MsgSize), true);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), (void *)&DispatchReq->CommandCode,
sizeof(DispatchReq->CommandCode), true);

if (UT_TABLE_DISPATCHER != 0)
{
/* If the code uses EDS dispatch, this will cause it to return the specified error */
if (DispatchReq->DispatchError != CFE_SUCCESS)
{
ErrorCode = DispatchReq->DispatchError;
}
else
{
/* If not specified, default to WRONG_MSG_LENGTH as this feature was historically used for testing
* bad length */
ErrorCode = CFE_STATUS_WRONG_MSG_LENGTH;
}

UT_SetDefaultReturnValue(UT_TABLE_DISPATCHER, ErrorCode);
}
}
}
else
Expand All @@ -227,6 +298,10 @@ void UT_SetupBasicMsgDispatch(const UT_TaskPipeDispatchId_t *DispatchReq, CFE_MS
UT_ResetState(UT_KEY(CFE_MSG_GetMsgId));
UT_ResetState(UT_KEY(CFE_MSG_GetSize));
UT_ResetState(UT_KEY(CFE_MSG_GetFcnCode));
if (UT_TABLE_DISPATCHER != 0)
{
UT_ResetState(UT_TABLE_DISPATCHER);
}
}
}

Expand Down
124 changes: 67 additions & 57 deletions modules/es/ut-coverage/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,62 +88,72 @@ CFE_ES_GMP_IndirectBuffer_t UT_MemPoolIndirectBuffer;
/* Create a startup script buffer for a maximum of 5 lines * 80 chars/line */
char StartupScript[MAX_STARTUP_SCRIPT];

static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_NOOP_CC = {.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID),
.CommandCode = CFE_ES_NOOP_CC};

static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESET_COUNTERS_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_RESET_COUNTERS_CC};

static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESTART_CC = {.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID),
.CommandCode = CFE_ES_RESTART_CC};

static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_START_APP_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_START_APP_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_STOP_APP_CC = {.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID),
.CommandCode = CFE_ES_STOP_APP_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESTART_APP_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_RESTART_APP_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RELOAD_APP_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_RELOAD_APP_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_QUERY_ONE_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_QUERY_ONE_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_QUERY_ALL_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_QUERY_ALL_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_QUERY_ALL_TASKS_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_QUERY_ALL_TASKS_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_CLEAR_SYS_LOG_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_CLEAR_SYS_LOG_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_WRITE_SYS_LOG_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_WRITE_SYS_LOG_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_OVER_WRITE_SYS_LOG_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_OVER_WRITE_SYS_LOG_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_CLEAR_ER_LOG_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_CLEAR_ER_LOG_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_WRITE_ER_LOG_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_WRITE_ER_LOG_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_START_PERF_DATA_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_START_PERF_DATA_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_STOP_PERF_DATA_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_STOP_PERF_DATA_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SET_PERF_FILTER_MASK_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_SET_PERF_FILTER_MASK_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SET_PERF_TRIGGER_MASK_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_SET_PERF_TRIGGER_MASK_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESET_PR_COUNT_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_RESET_PR_COUNT_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SET_MAX_PR_COUNT_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_SET_MAX_PR_COUNT_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_DELETE_CDS_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_DELETE_CDS_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SEND_MEM_POOL_STATS_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_SEND_MEM_POOL_STATS_CC};
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_DUMP_CDS_REGISTRY_CC = {
.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID), .CommandCode = CFE_ES_DUMP_CDS_REGISTRY_CC};

static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_INVALID_CC = {.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_CMD_MID),
.CommandCode = CFE_ES_DUMP_CDS_REGISTRY_CC + 2};

static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_SEND_HK = {.MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_SEND_HK_MID)};
/* Normal dispatching registers the MsgID+CC in order to follow a
* certain path through a series of switch statements */
#define ES_UT_MID_DISPATCH(intf) \
.Method = UT_TaskPipeDispatchMethod_MSG_ID_CC, .MsgId = CFE_SB_MSGID_WRAP_VALUE(CFE_ES_##intf##_MID)

#define ES_UT_MSG_DISPATCH(intf, cmd) ES_UT_MID_DISPATCH(intf), UT_TPD_SETSIZE(CFE_ES_##cmd)
#define ES_UT_CC_DISPATCH(intf, cc, cmd) ES_UT_MSG_DISPATCH(intf, cmd), UT_TPD_SETCC(cc)
#define ES_UT_ERROR_DISPATCH(intf, cc, err) ES_UT_MID_DISPATCH(intf), UT_TPD_SETCC(cc), UT_TPD_SETERR(err)

/* NOTE: Automatic formatting of this table tends to make it harder to read. */
/* clang-format off */
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_NOOP_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_NOOP_CC, NoopCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESET_COUNTERS_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_RESET_COUNTERS_CC, ResetCountersCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESTART_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_RESTART_CC, RestartCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_START_APP_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_START_APP_CC, StartAppCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_STOP_APP_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_STOP_APP_CC, StopAppCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESTART_APP_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_RESTART_APP_CC, RestartAppCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RELOAD_APP_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_RELOAD_APP_CC, ReloadAppCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_QUERY_ONE_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_QUERY_ONE_CC, QueryOneCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_QUERY_ALL_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_QUERY_ALL_CC, QueryAllCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_QUERY_ALL_TASKS_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_QUERY_ALL_TASKS_CC, QueryAllTasksCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_CLEAR_SYS_LOG_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_CLEAR_SYS_LOG_CC, ClearSysLogCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_WRITE_SYS_LOG_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_WRITE_SYS_LOG_CC, WriteSysLogCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_OVER_WRITE_SYS_LOG_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_OVER_WRITE_SYS_LOG_CC, OverWriteSysLogCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_CLEAR_ER_LOG_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_CLEAR_ER_LOG_CC, ClearERLogCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_WRITE_ER_LOG_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_WRITE_ER_LOG_CC, WriteERLogCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_START_PERF_DATA_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_START_PERF_DATA_CC, StartPerfDataCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_STOP_PERF_DATA_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_STOP_PERF_DATA_CC, StopPerfDataCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SET_PERF_FILTER_MASK_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_SET_PERF_FILTER_MASK_CC, SetPerfFilterMaskCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SET_PERF_TRIGGER_MASK_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_SET_PERF_TRIGGER_MASK_CC, SetPerfTriggerMaskCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_RESET_PR_COUNT_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_RESET_PR_COUNT_CC, ResetPRCountCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SET_MAX_PR_COUNT_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_SET_MAX_PR_COUNT_CC, SetMaxPRCountCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_DELETE_CDS_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_DELETE_CDS_CC, DeleteCDSCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_SEND_MEM_POOL_STATS_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_SEND_MEM_POOL_STATS_CC, SendMemPoolStatsCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_DUMP_CDS_REGISTRY_CC =
{ ES_UT_CC_DISPATCH(CMD, CFE_ES_DUMP_CDS_REGISTRY_CC, DumpCDSRegistryCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_SEND_HK =
{ ES_UT_MSG_DISPATCH(SEND_HK, SendHkCmd) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_INVALID_LENGTH =
{ ES_UT_ERROR_DISPATCH(CMD, 0, CFE_STATUS_WRONG_MSG_LENGTH) };
static const UT_TaskPipeDispatchId_t UT_TPID_CFE_ES_CMD_INVALID_CC =
{ ES_UT_ERROR_DISPATCH(CMD, -1, CFE_STATUS_BAD_COMMAND_CODE) };
/* clang-format on */

/*
** Functions
Expand Down Expand Up @@ -3248,7 +3258,7 @@ void TestTask(void)
* length call
*/
ES_ResetUnitTest();
UT_CallTaskPipe(CFE_ES_TaskPipe, CFE_MSG_PTR(CmdBuf), 0, UT_TPID_CFE_ES_CMD_CLEAR_ER_LOG_CC);
UT_CallTaskPipe(CFE_ES_TaskPipe, CFE_MSG_PTR(CmdBuf), 0, UT_TPID_CFE_ES_CMD_INVALID_LENGTH);
CFE_UtAssert_EVENTSENT(CFE_ES_LEN_ERR_EID);

/* Test resetting and setting the max for the processor reset count */
Expand Down
Loading

0 comments on commit fd8b810

Please sign in to comment.