Skip to content

Commit

Permalink
Merge pull request nasa#1113 from skliper/fix1014-subrptunexpcmdcode
Browse files Browse the repository at this point in the history
Fix nasa#1014, Remove Test_SB_Cmds_SubRptUnexpCmdCode
  • Loading branch information
astrogeco committed Feb 3, 2021
2 parents fddcd0a + 9740572 commit bb8e351
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
23 changes: 0 additions & 23 deletions fsw/cfe-core/unit-test/sb_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ void Test_SB_Cmds(void)
SB_UT_ADD_SUBTEST(Test_SB_Cmds_SubRptOn);
SB_UT_ADD_SUBTEST(Test_SB_Cmds_SubRptOff);
SB_UT_ADD_SUBTEST(Test_SB_Cmds_CmdUnexpCmdCode);
SB_UT_ADD_SUBTEST(Test_SB_Cmds_SubRptUnexpCmdCode);
SB_UT_ADD_SUBTEST(Test_SB_Cmds_BadCmdLength);
SB_UT_ADD_SUBTEST(Test_SB_Cmds_UnexpMsgId);
} /* end Test_SB_Cmds */
Expand Down Expand Up @@ -1486,28 +1485,6 @@ void Test_SB_Cmds_CmdUnexpCmdCode(void)

} /* end Test_SB_Cmds_UnexpCmdCode */

/*
** Test command handler response to an invalid command code
*/
void Test_SB_Cmds_SubRptUnexpCmdCode(void)
{
CFE_MSG_FcnCode_t FcnCode = 99;
CFE_SB_MsgId_t MsgIdCmd = CFE_SB_ValueToMsgId(CFE_SB_SUB_RPT_CTRL_MID);

/* Second GetFcnCode is for reporting */
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgIdCmd, sizeof(MsgIdCmd), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false);

/* Use a command code known to be invalid */
CFE_SB_ProcessCmdPipePkt((CFE_SB_Buffer_t *)NULL);

EVTCNT(1);

EVTSENT(CFE_SB_BAD_CMD_CODE_EID);

} /* end Test_SB_Cmds_UnexpCmdCode */

/*
** Test command handler response to an incorrect length
*/
Expand Down
16 changes: 0 additions & 16 deletions fsw/cfe-core/unit-test/sb_UT.h
Original file line number Diff line number Diff line change
Expand Up @@ -1088,22 +1088,6 @@ void Test_SB_Cmds_SubRptOff(void);
******************************************************************************/
void Test_SB_Cmds_CmdUnexpCmdCode(void);

/*****************************************************************************/
/**
** \brief Test command handler response to an invalid command code
**
** \par Description
** This function tests the command handler response to an invalid
** command code in the CFE_SB_SUB_RPT_CTRL_MID handler
**
** \par Assumptions, External Events, and Notes:
** None
**
** \returns
** This function does not return a value.
******************************************************************************/
void Test_SB_Cmds_SubRptUnexpCmdCode(void);

/*****************************************************************************/
/**
** \brief Test command handler response to a bad message length
Expand Down

0 comments on commit bb8e351

Please sign in to comment.