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

cFE Integration candidate: Equuleus-rc1+dev25 #2636

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Development Build: equuleus-rc1+dev235
- add initialization of table indices
- See <https://github.com/nasa/cFE/pull/2633>

## Development Build: equuleus-rc1+dev231
- Update Upload Artifact Version
- See <https://github.com/nasa/cFE/pull/2631>
Expand Down
2 changes: 1 addition & 1 deletion modules/core_api/fsw/inc/cfe_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define CFE_VERSION_H

/* Development Build Macro Definitions */
#define CFE_BUILD_NUMBER 231 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */
#define CFE_BUILD_NUMBER 235 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */
#define CFE_BUILD_BASELINE "equuleus-rc1" /**< @brief Development: Reference git tag for build number */
#define CFE_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */
#define CFE_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */
Expand Down
7 changes: 5 additions & 2 deletions modules/tbl/fsw/src/cfe_tbl_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ int32 CFE_TBL_TaskInit(void)
/*
** Task startup event message
*/
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE",
CFE_SRC_VERSION, CFE_BUILD_CODENAME, CFE_LAST_OFFICIAL);
CFE_Config_GetVersionString(VersionString, CFE_CFG_MAX_VERSION_STR_LEN, "cFE", CFE_SRC_VERSION, CFE_BUILD_CODENAME,
CFE_LAST_OFFICIAL);
Status = CFE_EVS_SendEvent(CFE_TBL_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "cFE TBL Initialized: %s",
VersionString);

Expand Down Expand Up @@ -199,4 +199,7 @@ void CFE_TBL_InitData(void)
/* Message ID is set when sent, so OK as 0 here */
CFE_MSG_Init(CFE_MSG_PTR(CFE_TBL_Global.NotifyMsg.CommandHeader), CFE_SB_INVALID_MSG_ID,
sizeof(CFE_TBL_Global.NotifyMsg));

CFE_TBL_Global.LastValidationResultId = CFE_ResourceId_FromInteger(CFE_TBL_VALRESULTID_BASE);
CFE_TBL_Global.LastDumpCtrlBlockId = CFE_ResourceId_FromInteger(CFE_TBL_DUMPCTRLID_BASE);
}
19 changes: 16 additions & 3 deletions modules/tbl/ut-coverage/tbl_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@
ValidateCmd.Payload.ActiveTableFlag = CFE_TBL_BufferSelect_ACTIVE;
CFE_TBL_Global.Registry[0].Buffers[CFE_TBL_Global.Registry[0].ActiveBufferIndex].BufferPtr = BuffPtr;

UT_SetDeferredRetcode(UT_KEY(CFE_ResourceId_FindNext), 1, 0);
UT_SetDeferredRetcode(UT_KEY(CFE_ResourceId_FindNext), 1, -1);
UtAssert_INT32_EQ(CFE_TBL_ValidateCmd(&ValidateCmd), CFE_TBL_INC_ERR_CTR);

/* Test where the active buffer has data, but there is no validation
Expand Down Expand Up @@ -1127,6 +1127,19 @@
snprintf(DumpCmd.Payload.TableName, sizeof(DumpCmd.Payload.TableName), "%d", CFE_PLATFORM_TBL_MAX_NUM_TABLES + 1);
UtAssert_INT32_EQ(CFE_TBL_DumpCmd(&DumpCmd), CFE_TBL_INC_ERR_CTR);

/* Test where the active buffer has data, but no dump control buffer is available
*/
UT_InitData();
strncpy(CFE_TBL_Global.Registry[2].Name, "DumpCmdTest", sizeof(CFE_TBL_Global.Registry[2].Name) - 1);
strncpy(DumpCmd.Payload.TableName, CFE_TBL_Global.Registry[2].Name, sizeof(DumpCmd.Payload.TableName) - 1);
CFE_TBL_Global.Registry[2].DumpOnly = true;
DumpCmd.Payload.TableName[sizeof(DumpCmd.Payload.TableName) - 1] = '\0';
DumpCmd.Payload.ActiveTableFlag = CFE_TBL_BufferSelect_ACTIVE;
CFE_TBL_Global.Registry[2].Buffers[CFE_TBL_Global.Registry[2].ActiveBufferIndex].BufferPtr = BuffPtr;

UT_SetDeferredRetcode(UT_KEY(CFE_ResourceId_FindNext), 1, -1);
UtAssert_INT32_EQ(CFE_TBL_DumpCmd(&DumpCmd), CFE_TBL_INC_ERR_CTR);

Check warning

Code scanning / CodeQL

Local variable address stored in non-local memory Warning

A stack address (
source
) may be assigned to a non-local variable.

/* Test with an active buffer, the pointer is created, validation passes,
* the table is dump only, no dump is already in progress, and have a
* working buffer; load in progress, single-buffered
Expand Down Expand Up @@ -4068,7 +4081,7 @@
UtAssert_BOOL_TRUE(CFE_TBL_CheckValidationResultSlotUsed(PendingId));

/* Test case where no ID is available */
UT_SetDefaultReturnValue(UT_KEY(CFE_ResourceId_FindNext), 0);
UT_SetDefaultReturnValue(UT_KEY(CFE_ResourceId_FindNext), -1);
UtAssert_VOIDCALL(PendingId = CFE_TBL_GetNextValResultBlock());
UtAssert_BOOL_FALSE(CFE_ResourceId_IsDefined(PendingId));

Expand Down Expand Up @@ -4167,7 +4180,7 @@
UtAssert_BOOL_TRUE(CFE_TBL_CheckDumpCtrlSlotUsed(PendingId));

/* Test case where no ID is available */
UT_SetDefaultReturnValue(UT_KEY(CFE_ResourceId_FindNext), 0);
UT_SetDefaultReturnValue(UT_KEY(CFE_ResourceId_FindNext), -1);
UtAssert_VOIDCALL(PendingId = CFE_TBL_GetNextDumpCtrlBlock());
UtAssert_BOOL_FALSE(CFE_ResourceId_IsDefined(PendingId));

Expand Down
Loading