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+dev17 #2598

Merged
merged 7 commits into from
Aug 29, 2024
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Development Build: equuleus-rc1+dev195
- Use string append and add newline
- Yield cpu to other tasks in SB Perf Test
- See <https://github.com/nasa/cFE/pull/2596> and <https://github.com/nasa/cFE/pull/2593>

## Development Build: equuleus-rc1+dev187
- Use proper printf format for size_t
- See <https://github.com/nasa/cFE/pull/2591>
Expand Down
35 changes: 33 additions & 2 deletions modules/cfe_testcase/src/sb_performance_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
/* Number of messages to send during test */
uint32_t UT_BulkTestDuration = 1000;

/* Number of SB messages sent before yielding CPU (has to be power of 2 minus 1)*/
static uint32_t UT_CpuYieldMask = 1024 - 1;

/* State structure for multicore test - shared between threads */
typedef struct UT_BulkMultiCoreSharedState
{
Expand Down Expand Up @@ -209,6 +212,13 @@
UtAssert_UINT32_EQ(CmdPtr->Payload.Value, CmdMsg.Payload.Value);
break;
}

/* Only yield CPU once in a while to avoid slowing down the test with too many context switches */
if ((BulkCmd.SendCount & UT_CpuYieldMask) == 0)
{
/* Yield cpu to other task with same priority */
OS_TaskDelay(0);
}
}

CFE_PSP_GetTime(&BulkCmd.EndTime);
Expand Down Expand Up @@ -255,6 +265,13 @@
UtAssert_UINT32_EQ(TlmPtr->Payload.Value, TlmMsg.Payload.Value);
break;
}

/* Only yield CPU once in a while to avoid slowing down the test with too many context switches */
if ((BulkTlm.SendCount & UT_CpuYieldMask) == 0)
{
/* Yield cpu to other task with same priority */
OS_TaskDelay(0);
}
}

CFE_PSP_GetTime(&BulkTlm.EndTime);
Expand Down Expand Up @@ -388,12 +405,19 @@
CFE_Assert_STATUS_MUST_BE(CFE_SUCCESS);
break;
}

/* Only yield CPU once in a while to avoid slowing down the test with too many context switches */
if ((BulkCmd.SendCount & UT_CpuYieldMask) == 0)
{
/* Yield cpu to other task with same priority */
OS_TaskDelay(0);
}
}

BulkCmd.XmitFinished = true;
}

void UT_TelemtryTransmitterTask(void)
void UT_TelemetryTransmitterTask(void)

Check notice

Code scanning / CodeQL

Long function without assertion Note test

All functions of more than 10 lines should have at least one assertion.
{
CFE_SB_Buffer_t * BufPtr;
CFE_TEST_TestTlmMessage32_t *TlmMsgPtr;
Expand Down Expand Up @@ -424,6 +448,13 @@
CFE_Assert_STATUS_MUST_BE(CFE_SUCCESS);
break;
}

/* Only yield CPU once in a while to avoid slowing down the test with too many context switches */
if ((BulkTlm.SendCount & UT_CpuYieldMask) == 0)
{
/* Yield cpu to other task with same priority */
OS_TaskDelay(0);
}
}

BulkTlm.XmitFinished = true;
Expand Down Expand Up @@ -521,7 +552,7 @@
CFE_ES_CreateChildTask(&BulkCmd.TaskIdXmit, "CmdXmit", UT_CommandTransmitterTask, NULL, 32768, 150, 0),
CFE_SUCCESS);
UtAssert_INT32_EQ(
CFE_ES_CreateChildTask(&BulkTlm.TaskIdXmit, "TlmXmit", UT_TelemtryTransmitterTask, NULL, 32768, 150, 0),
CFE_ES_CreateChildTask(&BulkTlm.TaskIdXmit, "TlmXmit", UT_TelemetryTransmitterTask, NULL, 32768, 150, 0),
CFE_SUCCESS);
UtAssert_INT32_EQ(
CFE_ES_CreateChildTask(&BulkCmd.TaskIdRecv, "CmdRecv", UT_CommandReceiverTask, NULL, 32768, 100, 0),
Expand Down
2 changes: 1 addition & 1 deletion modules/config/tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ foreach(SYSVAR ${TGTSYS_LIST})
set(PLATFORM_DEFINE_FILE ${MISSION_BINARY_DIR}/src/${OBJLIB_NAME}.c)
set(PLATFORM_LIST_FILE ${MISSION_BINARY_DIR}/src/${OBJLIB_NAME}.list)
list(APPEND PLATFORM_CONFIG_LIST $<TARGET_OBJECTS:${OBJLIB_NAME}>)
list(APPEND PLATFORM_OBJ_NAMES "CFE_PLATFORM(${SYSVAR})")
string(APPEND PLATFORM_OBJ_NAMES "CFE_PLATFORM(${SYSVAR})\n")

add_custom_command(
OUTPUT ${PLATFORM_DEFINE_FILE}
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 187 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */
#define CFE_BUILD_NUMBER 195 /**< @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
Loading