Skip to content

Commit

Permalink
Fix nasa#1834 CFE_TBL_Modified: Test CRC, updated flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pepepr08 committed Aug 23, 2021
1 parent 5e41330 commit d86742c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/tbl/ut-coverage/tbl_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -3104,10 +3104,18 @@ void Test_CFE_TBL_TblMod(void)
CFE_UtAssert_EVENTSENT(CFE_TBL_LOAD_SUCCESS_INF_EID);
CFE_UtAssert_EVENTCOUNT(1);

/* Notify Table Services that the table has been modified */
/*
* Notify Table Services that the table has been modified. Verify CRC has been
* calculated and table has been flagged as Updated
*/
UT_SetDeferredRetcode(UT_KEY(CFE_ES_CalculateCRC), 1, 0xF00D);
CFE_TBL_Global.Handles[AccessIterator].Updated = false;
CFE_UtAssert_SUCCESS(CFE_TBL_Modified(App1TblHandle1));
UtAssert_BOOL_TRUE(CFE_TBL_Global.Handles[AccessIterator].Updated);
CFE_UtAssert_SUCCESS(CFE_TBL_GetInfo(&TblInfo1, "ut_cfe_tbl.UT_Table2"));
UtAssert_INT32_EQ(TblInfo1.TimeOfLastUpdate.Seconds, TblInfo1.TimeOfLastUpdate.Subseconds);
UtAssert_UINT32_EQ(TblInfo1.Crc, 0xF00D);
UtAssert_INT32_EQ(CFE_TBL_GetAddress((void **)&TblDataPtr, App1TblHandle1), CFE_TBL_INFO_UPDATED);

/*
* LastFileLoaded (limited by mission) can be bigger than MyFilename (limited by osal),
Expand Down

0 comments on commit d86742c

Please sign in to comment.