From 45c0ae6d8f8ca396f4fed3a9e887a660886310f1 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Tue, 25 Jan 2022 16:04:54 -0700 Subject: [PATCH 1/5] Fix #2036, Revert breaking change to CFE_ES_AppInfo_t structure --- docs/src/mnem_maps/cfe_es_tlm_mnem_map | 6 +++ modules/cfe_testcase/src/es_info_test.c | 37 +++++++++---------- .../core_api/fsw/inc/cfe_es_extern_typedefs.h | 26 ++++++------- modules/es/eds/cfe_es.xml | 30 +++++++++++++++ modules/es/fsw/src/cfe_es_apps.c | 14 +++---- 5 files changed, 73 insertions(+), 40 deletions(-) diff --git a/docs/src/mnem_maps/cfe_es_tlm_mnem_map b/docs/src/mnem_maps/cfe_es_tlm_mnem_map index e847477a9..e76b8701d 100644 --- a/docs/src/mnem_maps/cfe_es_tlm_mnem_map +++ b/docs/src/mnem_maps/cfe_es_tlm_mnem_map @@ -68,6 +68,12 @@ ES_APPFILENAME=$sc_$cpu_ES_AppFilename[OS_MAX_PATH_LEN] \ ES_STACKSIZE=$sc_$cpu_ES_StackSize \ ES_MODULEID=$sc_$cpu_ES_ModuleID \ ES_ADDRVALID=$sc_$cpu_ES_AddrsValid \ +ES_CODEADDR=$sc_$cpu_ES_CodeAddress \ +ES_CODESIZE=$sc_$cpu_ES_CodeSize \ +ES_DATAADDR=$sc_$cpu_ES_DataAddress \ +ES_DATASIZE=$sc_$cpu_ES_DataSize \ +ES_BSSADDR=$sc_$cpu_ES_BSSAddress \ +ES_BSSSIZE=$sc_$cpu_ES_BSSSize \ ES_STARTADDR=$sc_$cpu_ES_StartAddr \ ES_EXCEPTNACTN=$sc_$cpu_ES_ExceptnActn \ ES_PRIORITY=$sc_$cpu_ES_Priority \ diff --git a/modules/cfe_testcase/src/es_info_test.c b/modules/cfe_testcase/src/es_info_test.c index 632cdce67..27990fbde 100644 --- a/modules/cfe_testcase/src/es_info_test.c +++ b/modules/cfe_testcase/src/es_info_test.c @@ -79,20 +79,19 @@ void TestAppInfo(void) if (TestAppInfo.AddressesAreValid) { - UtAssert_True(TestAppInfo.AddressesAreValid > 0, "Test App Info -> Addrs.Valid? = %d", + UtAssert_True(TestAppInfo.AddressesAreValid > 0, "Test App Info -> AddrsValid? = %d", (int)TestAppInfo.AddressesAreValid); - UtAssert_True(TestAppInfo.Code.Address > 0, "Test App Info -> Code.Address = %ld", - (unsigned long)TestAppInfo.Code.Address); - UtAssert_True(TestAppInfo.Code.Size > 0, "Test App Info -> Code.Size = %ld", - (unsigned long)TestAppInfo.Code.Size); - UtAssert_True(TestAppInfo.Data.Address > 0, "Test App Info -> Data.Address = %ld", - (unsigned long)TestAppInfo.Data.Address); - UtAssert_True(TestAppInfo.Data.Size > 0, "Test App Info -> Data.Size = %ld", - (unsigned long)TestAppInfo.Data.Size); - UtAssert_True(TestAppInfo.BSS.Address > 0, "Test App Info -> BSS.Address = %ld", - (unsigned long)TestAppInfo.BSS.Address); - UtAssert_True(TestAppInfo.BSS.Size > 0, "Test App Info -> BSS.Size = %ld", - (unsigned long)TestAppInfo.BSS.Size); + UtAssert_True(TestAppInfo.CodeAddress > 0, "Test App Info -> CodeAddress = %ld", + (unsigned long)TestAppInfo.CodeAddress); + UtAssert_True(TestAppInfo.CodeSize > 0, "Test App Info -> CodeSize = %ld", + (unsigned long)TestAppInfo.CodeSize); + UtAssert_True(TestAppInfo.DataAddress > 0, "Test App Info -> DataAddress = %ld", + (unsigned long)TestAppInfo.DataAddress); + UtAssert_True(TestAppInfo.DataSize > 0, "Test App Info -> DataSize = %ld", + (unsigned long)TestAppInfo.DataSize); + UtAssert_True(TestAppInfo.BSSAddress > 0, "Test App Info -> BSSAddress = %ld", + (unsigned long)TestAppInfo.BSSAddress); + UtAssert_True(TestAppInfo.BSSSize > 0, "Test App Info -> BSSSize = %ld", (unsigned long)TestAppInfo.BSSSize); } else { @@ -191,12 +190,12 @@ void TestLibInfo(void) { UtAssert_True(LibInfo.AddressesAreValid > 0, "Lib Info -> AddrsValid? = %ld", (unsigned long)LibInfo.AddressesAreValid); - UtAssert_True(LibInfo.Code.Address > 0, "Lib Info -> CodeAddress = %ld", (unsigned long)LibInfo.Code.Address); - UtAssert_True(LibInfo.Code.Size > 0, "Lib Info -> Code.Size = %ld", (unsigned long)LibInfo.Code.Size); - UtAssert_True(LibInfo.Data.Address > 0, "Lib Info -> Data.Address = %ld", (unsigned long)LibInfo.Data.Address); - UtAssert_True(LibInfo.Data.Size > 0, "Lib Info -> Data.Size = %ld", (unsigned long)LibInfo.Data.Size); - UtAssert_True(LibInfo.BSS.Address > 0, "Lib Info -> BSS.Address = %ld", (unsigned long)LibInfo.BSS.Address); - UtAssert_True(LibInfo.BSS.Size > 0, "Lib Info -> BSS.Size = %ld", (unsigned long)LibInfo.BSS.Size); + UtAssert_True(LibInfo.CodeAddress > 0, "Lib Info -> CodeAddress = %ld", (unsigned long)LibInfo.CodeAddress); + UtAssert_True(LibInfo.CodeSize > 0, "Lib Info -> CodeSize = %ld", (unsigned long)LibInfo.CodeSize); + UtAssert_True(LibInfo.DataAddress > 0, "Lib Info -> DataAddress = %ld", (unsigned long)LibInfo.DataAddress); + UtAssert_True(LibInfo.DataSize > 0, "Lib Info -> DataSize = %ld", (unsigned long)LibInfo.DataSize); + UtAssert_True(LibInfo.BSSAddress > 0, "Lib Info -> BSSAddress = %ld", (unsigned long)LibInfo.BSSAddress); + UtAssert_True(LibInfo.BSSSize > 0, "Lib Info -> BSSSize = %ld", (unsigned long)LibInfo.BSSSize); } else { diff --git a/modules/core_api/fsw/inc/cfe_es_extern_typedefs.h b/modules/core_api/fsw/inc/cfe_es_extern_typedefs.h index 2233f5f79..0d1949c27 100644 --- a/modules/core_api/fsw/inc/cfe_es_extern_typedefs.h +++ b/modules/core_api/fsw/inc/cfe_es_extern_typedefs.h @@ -427,17 +427,6 @@ typedef uint32 CFE_ES_MemAddress_t; */ #define CFE_ES_MEMADDRESS_C(x) ((CFE_ES_MemAddress_t)((cpuaddr)(x)&0xFFFFFFFF)) -/** - * Memory Address and Memory Offset combination - * - * A combination of #CFE_ES_MemAddress_t and #CFE_ES_MemOffset_t, since they are often used together. - */ -typedef struct CFE_ES_MemAddOff -{ - CFE_ES_MemAddress_t Address; /**< \brief Code section address */ - CFE_ES_MemOffset_t Size; /**< \brief Code section size */ -} CFE_ES_MemAddOff_t; - /* * Data Structures shared between API and Message (CMD/TLM) interfaces */ @@ -470,9 +459,18 @@ typedef struct CFE_ES_AppInfo \brief The Stack Size of the Application */ uint32 AddressesAreValid; /**< \cfetlmmnemonic \ES_ADDRVALID \brief Indicates that the Code, Data, and BSS addresses/sizes are valid */ - CFE_ES_MemAddOff_t Code; /**< \brief code section address/size structure */ - CFE_ES_MemAddOff_t Data; /**< \brief Data section address/size structure */ - CFE_ES_MemAddOff_t BSS; /**< \brief BSS section address/size structure */ + CFE_ES_MemAddress_t CodeAddress; /**< \cfetlmmnemonic \ES_CODEADDR + \brief The Address of the Application Code Segment*/ + CFE_ES_MemOffset_t CodeSize; /**< \cfetlmmnemonic \ES_CODESIZE + \brief The Code Size of the Application */ + CFE_ES_MemAddress_t DataAddress; /**< \cfetlmmnemonic \ES_DATAADDR + \brief The Address of the Application Data Segment*/ + CFE_ES_MemOffset_t DataSize; /**< \cfetlmmnemonic \ES_DATASIZE + \brief The Data Size of the Application */ + CFE_ES_MemAddress_t BSSAddress; /**< \cfetlmmnemonic \ES_BSSADDR + \brief The Address of the Application BSS Segment*/ + CFE_ES_MemOffset_t BSSSize; /**< \cfetlmmnemonic \ES_BSSSIZE + \brief The BSS Size of the Application */ CFE_ES_MemAddress_t StartAddress; /**< \cfetlmmnemonic \ES_STARTADDR \brief The Start Address of the Application */ CFE_ES_ExceptionAction_Enum_t ExceptionAction; /**< \cfetlmmnemonic \ES_EXCEPTNACTN diff --git a/modules/es/eds/cfe_es.xml b/modules/es/eds/cfe_es.xml index f32537039..2e4bdf978 100644 --- a/modules/es/eds/cfe_es.xml +++ b/modules/es/eds/cfe_es.xml @@ -173,6 +173,36 @@ \cfetlmmnemonic \ES_ADDRVALID + + + \cfetlmmnemonic \ES_CODEADDR + + + + + \cfetlmmnemonic \ES_CODESIZE + + + + + \cfetlmmnemonic \ES_DATAADDR + + + + + \cfetlmmnemonic \ES_DATASIZE + + + + + \cfetlmmnemonic \ES_BSSADDR + + + + + \cfetlmmnemonic \ES_BSSSIZE + + \cfetlmmnemonic \ES_STARTADDR diff --git a/modules/es/fsw/src/cfe_es_apps.c b/modules/es/fsw/src/cfe_es_apps.c index 35e8f3cb0..8d583fcb3 100644 --- a/modules/es/fsw/src/cfe_es_apps.c +++ b/modules/es/fsw/src/cfe_es_apps.c @@ -1791,7 +1791,7 @@ void CFE_ES_CopyModuleAddressInfo(osal_id_t ModuleId, CFE_ES_AppInfo_t *AppInfoP if (OsStatus == OS_SUCCESS) { AppInfoPtr->AddressesAreValid = - (sizeof(ModuleInfo.addr.code_address) <= sizeof(AppInfoPtr->Code.Address)) && ModuleInfo.addr.valid; + (sizeof(ModuleInfo.addr.code_address) <= sizeof(AppInfoPtr->CodeAddress)) && ModuleInfo.addr.valid; } else { @@ -1803,10 +1803,10 @@ void CFE_ES_CopyModuleAddressInfo(osal_id_t ModuleId, CFE_ES_AppInfo_t *AppInfoP * Convert the internal size and address to the telemetry format. * (The telemetry format may be a different bitwidth than the native processor) */ - AppInfoPtr->Code.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.code_address); - AppInfoPtr->Code.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.code_size); - AppInfoPtr->Data.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.data_address); - AppInfoPtr->Data.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.data_size); - AppInfoPtr->BSS.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.bss_address); - AppInfoPtr->BSS.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.bss_size); + AppInfoPtr->CodeAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.code_address); + AppInfoPtr->CodeSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.code_size); + AppInfoPtr->DataAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.data_address); + AppInfoPtr->DataSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.data_size); + AppInfoPtr->BSSAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.bss_address); + AppInfoPtr->BSSSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.bss_size); } From a5f27e8fa5a41085d48464cac53aeb5aae683a32 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Fri, 28 Jan 2022 18:00:55 -0700 Subject: [PATCH 2/5] Fix #2040, Improve CFE_SB_IsValidMsgId handler If no return value override is set test against CFE_SB_INVALID_MSG_ID --- modules/core_api/ut-stubs/src/cfe_sb_handlers.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/core_api/ut-stubs/src/cfe_sb_handlers.c b/modules/core_api/ut-stubs/src/cfe_sb_handlers.c index 2e245748e..5e0ec1bf9 100644 --- a/modules/core_api/ut-stubs/src/cfe_sb_handlers.c +++ b/modules/core_api/ut-stubs/src/cfe_sb_handlers.c @@ -398,12 +398,19 @@ void UT_DefaultHandler_CFE_SB_GetUserDataLength(void *UserObj, UT_EntryKey_t Fun *------------------------------------------------------------*/ void UT_DefaultHandler_CFE_SB_IsValidMsgId(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) { - int32 status; - bool return_value; - - UT_Stub_GetInt32StatusCode(Context, &status); + int32 status; + bool return_value; + CFE_SB_MsgId_t MsgId = UT_Hook_GetArgValueByName(Context, "MsgId", CFE_SB_MsgId_t); - return_value = status; + if (UT_Stub_GetInt32StatusCode(Context, &status)) + { + return_value = status; + } + else + { + /* The only invalid value UT's should be using is CFE_SB_INVALID_MSG_ID */ + return_value = !CFE_SB_MsgId_Equal(MsgId, CFE_SB_INVALID_MSG_ID); + } UT_Stub_SetReturnValue(FuncKey, return_value); } From df5d2c0f5807e5cceedcb9c928e5ea412db5b42f Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Sun, 30 Jan 2022 13:21:40 +0100 Subject: [PATCH 3/5] Fix #2039, Replace CFE_SB_ValueToMsgId(0) with CFE_SB_INVALID_MSG_ID --- modules/cfe_testcase/src/message_id_test.c | 2 +- modules/cfe_testcase/src/msg_api_test.c | 4 ++-- modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c | 2 +- modules/msg/ut-coverage/test_cfe_msg_init.c | 4 ++-- modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c | 2 +- modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c | 6 +++--- modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c | 6 +++--- modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c | 6 +++--- modules/tbl/fsw/src/cfe_tbl_task.c | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/cfe_testcase/src/message_id_test.c b/modules/cfe_testcase/src/message_id_test.c index 2956c2895..28e53bbca 100644 --- a/modules/cfe_testcase/src/message_id_test.c +++ b/modules/cfe_testcase/src/message_id_test.c @@ -67,7 +67,7 @@ void TestMsgId(void) void TestGetTypeFromMsgId(void) { UtPrintf("Testing: CFE_MSG_GetTypeFromMsgId"); - CFE_SB_MsgId_t msgid = CFE_SB_ValueToMsgId(0); + CFE_SB_MsgId_t msgid = CFE_SB_INVALID_MSG_ID; CFE_MSG_Type_t msgtype; int32 status; diff --git a/modules/cfe_testcase/src/msg_api_test.c b/modules/cfe_testcase/src/msg_api_test.c index 9d1452e8b..ddf098070 100644 --- a/modules/cfe_testcase/src/msg_api_test.c +++ b/modules/cfe_testcase/src/msg_api_test.c @@ -53,7 +53,7 @@ void TestMsgApiBasic(void) msgId = CFE_SB_ValueToMsgId(1); /* test msg-init */ - UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_ValueToMsgId(0), sizeof(cmd)), CFE_MSG_BAD_ARGUMENT); + UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_INVALID_MSG_ID, sizeof(cmd)), CFE_MSG_BAD_ARGUMENT); UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), msgId, 0), CFE_MSG_BAD_ARGUMENT); UtAssert_INT32_EQ( CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_ValueToMsgId(CFE_PLATFORM_SB_HIGHEST_VALID_MSGID + 1), sizeof(cmd)), @@ -139,7 +139,7 @@ void TestMsgApiAdvanced(void) CFE_MSG_SequenceCount_t seqCnt; memset(&cmd, 0xFF, sizeof(cmd)); - msgId = CFE_SB_ValueToMsgId(0); + msgId = CFE_SB_INVALID_MSG_ID; UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), msgId, sizeof(cmd)), CFE_SUCCESS); diff --git a/modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c b/modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c index 7003bc5c3..5767403e1 100644 --- a/modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c +++ b/modules/msg/ut-coverage/test_cfe_msg_ccsdsext.c @@ -61,7 +61,7 @@ void Test_MSG_Init_Ext(void) /* Get msgid version by checking if msgid sets "has secondary" field*/ memset(&msg, 0xFF, sizeof(msg)); - CFE_UtAssert_SUCCESS(CFE_MSG_SetMsgId(&msg, CFE_SB_ValueToMsgId(0))); + CFE_UtAssert_SUCCESS(CFE_MSG_SetMsgId(&msg, CFE_SB_INVALID_MSG_ID)); CFE_UtAssert_SUCCESS(CFE_MSG_GetHasSecondaryHeader(&msg, &hassec)); is_v1 = !hassec; diff --git a/modules/msg/ut-coverage/test_cfe_msg_init.c b/modules/msg/ut-coverage/test_cfe_msg_init.c index bfa67591e..5d9aa201e 100644 --- a/modules/msg/ut-coverage/test_cfe_msg_init.c +++ b/modules/msg/ut-coverage/test_cfe_msg_init.c @@ -54,8 +54,8 @@ void Test_MSG_Init(void) bool is_v1; UtPrintf("Bad parameter tests, Null pointer, invalid size, invalid msgid"); - UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_ValueToMsgId(0), sizeof(cmd)), CFE_MSG_BAD_ARGUMENT); - UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_ValueToMsgId(0), 0), CFE_MSG_BAD_ARGUMENT); + UtAssert_INT32_EQ(CFE_MSG_Init(NULL, CFE_SB_INVALID_MSG_ID, sizeof(cmd)), CFE_MSG_BAD_ARGUMENT); + UtAssert_INT32_EQ(CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_INVALID_MSG_ID, 0), CFE_MSG_BAD_ARGUMENT); UtAssert_INT32_EQ( CFE_MSG_Init(CFE_MSG_PTR(cmd), CFE_SB_ValueToMsgId(CFE_PLATFORM_SB_HIGHEST_VALID_MSGID + 1), sizeof(cmd)), CFE_MSG_BAD_ARGUMENT); diff --git a/modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c b/modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c index 65151ab22..5ed169d71 100644 --- a/modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c +++ b/modules/msg/ut-coverage/test_cfe_msg_msgid_shared.c @@ -37,7 +37,7 @@ void Test_MSG_GetTypeFromMsgId(void) { CFE_MSG_Message_t msg; - CFE_SB_MsgId_t msgid = CFE_SB_ValueToMsgId(0); + CFE_SB_MsgId_t msgid = CFE_SB_INVALID_MSG_ID; CFE_MSG_Type_t actual = CFE_MSG_Type_Invalid; UtPrintf("Bad parameter tests, Null pointer"); diff --git a/modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c b/modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c index b5349ac9d..6e5cc0451 100644 --- a/modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c +++ b/modules/sbr/ut-coverage/test_cfe_sbr_map_direct.c @@ -48,8 +48,8 @@ void Test_SBR_Map_Direct(void) uint32 i; UtPrintf("Invalid msg checks"); - UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_ValueToMsgId(0), CFE_SBR_ValueToRouteId(0)), 0); - UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_ValueToMsgId(0)))); + UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_INVALID_MSG_ID, CFE_SBR_ValueToRouteId(0)), 0); + UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_INVALID_MSG_ID))); UtPrintf("Initialize map"); CFE_SBR_Init_Map(); @@ -83,7 +83,7 @@ void Test_SBR_Map_Direct(void) UtPrintf("Set/Get a range of ids "); routeid = CFE_SBR_ValueToRouteId(CFE_PLATFORM_SB_MAX_MSG_IDS + 1); - msgid = CFE_SB_ValueToMsgId(0); + msgid = CFE_SB_INVALID_MSG_ID; UtAssert_INT32_EQ(CFE_SBR_SetRouteId(msgid, routeid), 0); UtAssert_INT32_EQ(CFE_SBR_GetRouteId(msgid).RouteId, routeid.RouteId); diff --git a/modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c b/modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c index 16e4b50ea..f7f20fc08 100644 --- a/modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c +++ b/modules/sbr/ut-coverage/test_cfe_sbr_map_hash.c @@ -67,8 +67,8 @@ void Test_SBR_Map_Hash(void) uint32 collisions; UtPrintf("Invalid msg checks"); - UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_ValueToMsgId(0), CFE_SBR_ValueToRouteId(0)), 0); - UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_ValueToMsgId(0)))); + UtAssert_INT32_EQ(CFE_SBR_SetRouteId(CFE_SB_INVALID_MSG_ID, CFE_SBR_ValueToRouteId(0)), 0); + UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_GetRouteId(CFE_SB_INVALID_MSG_ID))); UtPrintf("Initialize routing and map"); CFE_SBR_Init(); @@ -102,7 +102,7 @@ void Test_SBR_Map_Hash(void) /* Note AddRoute required for hash logic to work since it depends on MsgId in routing table */ UtPrintf("Add routes and check with a rollover and a skip"); - msgid[0] = CFE_SB_ValueToMsgId(0); + msgid[0] = CFE_SB_INVALID_MSG_ID; msgid[1] = Test_SBR_Unhash(0xFFFFFFFF); msgid[2] = Test_SBR_Unhash(0x7FFFFFFF); routeid[0] = CFE_SBR_AddRoute(msgid[0], &collisions); diff --git a/modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c b/modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c index fe0247557..f7a1557ad 100644 --- a/modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c +++ b/modules/sbr/ut-coverage/test_cfe_sbr_route_unsorted.c @@ -51,8 +51,8 @@ void Test_SBR_Route_Unsort_General(void) CFE_SBR_Init(); UtPrintf("Invalid msg checks"); - UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_ValueToMsgId(0), NULL))); - UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_ValueToMsgId(0), &collisions))); + UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_INVALID_MSG_ID, NULL))); + UtAssert_BOOL_FALSE(CFE_SBR_IsValidRouteId(CFE_SBR_AddRoute(CFE_SB_INVALID_MSG_ID, &collisions))); UtAssert_INT32_EQ(collisions, 0); /* @@ -159,7 +159,7 @@ void Test_SBR_Route_Unsort_GetSet(void) UtAssert_INT32_EQ(count, 0); UtPrintf("Add routes and initialize values for testing"); - msgid[0] = CFE_SB_ValueToMsgId(0); + msgid[0] = CFE_SB_INVALID_MSG_ID; msgid[1] = CFE_SB_ValueToMsgId(1); msgid[2] = CFE_SB_ValueToMsgId(CFE_PLATFORM_SB_HIGHEST_VALID_MSGID); diff --git a/modules/tbl/fsw/src/cfe_tbl_task.c b/modules/tbl/fsw/src/cfe_tbl_task.c index 86ee8ea82..84cea795d 100644 --- a/modules/tbl/fsw/src/cfe_tbl_task.c +++ b/modules/tbl/fsw/src/cfe_tbl_task.c @@ -245,7 +245,7 @@ void CFE_TBL_InitData(void) sizeof(CFE_TBL_Global.TblRegPacket)); /* Message ID is set when sent, so OK as 0 here */ - CFE_MSG_Init(CFE_MSG_PTR(CFE_TBL_Global.NotifyMsg.CommandHeader), CFE_SB_ValueToMsgId(0), + CFE_MSG_Init(CFE_MSG_PTR(CFE_TBL_Global.NotifyMsg.CommandHeader), CFE_SB_INVALID_MSG_ID, sizeof(CFE_TBL_Global.NotifyMsg)); } From 81b3a9ca32af1184160e9ca3f6ad554a45deed74 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Mon, 24 Jan 2022 11:46:52 -0500 Subject: [PATCH 4/5] Fix #2034, Fix git error in CodeQL workflow - Add new parameters to match updated cFS-CodeQL workflow interface introduced in nasa/cFS#413 - Add file-exclusion checks to Action trigger so workflow doesn't run if only changes in commit or pull request are to documentation --- .github/workflows/codeql-build.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-build.yml b/.github/workflows/codeql-build.yml index 21b4a1db4..8cce99cb4 100644 --- a/.github/workflows/codeql-build.yml +++ b/.github/workflows/codeql-build.yml @@ -2,12 +2,21 @@ name: "CodeQL Analysis" on: push: + paths-ignore: + - '**/*.md' + - '**/*.txt' + - '**/*.dox' + pull_request: - + paths-ignore: + - '**/*.md' + - '**/*.txt' + - '**/*.dox' + jobs: codeql: - name: CodeQL Analysis - uses: nasa/cFS/.github/workflows/codeql-build.yml@main + uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main with: - make-prep: 'make prep' - make: 'make -C build/native/default_cpu1 core_api core_private es evs fs msg resourceid sb sbr tbl time' \ No newline at end of file + component-path: cfe + make: make -j8 + test: true From a022e0f2aec9af93040b91aeb6e68990cc8c02e4 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Thu, 3 Feb 2022 15:42:52 -0500 Subject: [PATCH 5/5] Bump to v7.0.0-rc4+dev70 --- README.md | 8 ++++++++ modules/core_api/fsw/inc/cfe_version.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a96f9e56a..e5218e484 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,14 @@ The detailed cFE user's guide can be viewed at and + + ### Development Build: v7.0.0-rc4+dev60 - Add CFE_ES_AppInfo_t element documentation diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index d6322dde2..7d127dd50 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -28,7 +28,7 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 60 /**< @brief Development: Number of development commits since baseline */ +#define CFE_BUILD_NUMBER 70 /**< @brief Development: Number of development commits since baseline */ #define CFE_BUILD_BASELINE "v7.0.0-rc4" /**< @brief Development: Reference git tag for build number */ /* Version Macro Definitions updated for official releases only */