Skip to content

Commit

Permalink
Fix #445, Coverage Test typos + bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Dec 11, 2024
1 parent cdc73e5 commit 0811425
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions fsw/modules/rtems_sysmon/rtems_sysmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void rtems_sysmon_Init(uint32_t local_module_id)
rtems_sysmon_global.local_module_id = local_module_id;
}

static bool rtems_cpu_usage_vistor(Thread_Control *the_thread, void *arg)
static bool rtems_cpu_usage_visitor(Thread_Control *the_thread, void *arg)
{
rtems_sysmon_cpuload_state_t *state = (rtems_sysmon_cpuload_state_t *)arg;
rtems_sysmon_cpuload_core_t* core_p = &state->per_core[state->num_cpus];
Expand Down Expand Up @@ -213,7 +213,7 @@ static bool rtems_cpu_usage_vistor(Thread_Control *the_thread, void *arg)
void rtems_sysmon_update_stat(rtems_sysmon_cpuload_state_t *state)
{
state->num_cpus = 0;
rtems_task_iterate( rtems_cpu_usage_vistor, state);
rtems_task_iterate(rtems_cpu_usage_visitor, state);
}

rtems_task rtems_sysmon_Task(rtems_task_argument arg)
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-rtems/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ int32 CFE_PSP_ReadFromCDS(void *PtrToDataToRead, uint32 CDSOffset, uint32 NumByt
return_code = OS_ERROR;
}

} /* end if PtrToDataToWrite == NULL */
} /* end if PtrToDataToRead == NULL */

return return_code;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void Test_CFE_PSP_PortRead32(void)
UtAddress2 = (cpuaddr)&UT_RAM_BLOCK.u32[4];

UT_RAM_BLOCK.u32[3] = 0xAABBCCDD;
UT_RAM_BLOCK.u32[3] = 0x44556677;
UT_RAM_BLOCK.u32[4] = 0x44556677;

UtAssert_INT32_EQ(CFE_PSP_PortRead32(UtAddress1, NULL), CFE_PSP_INVALID_POINTER);
UtAssert_INT32_EQ(CFE_PSP_PortRead32(UtAddress1, &Value1), CFE_PSP_SUCCESS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void Test_CFE_PSP_MemRead32(void)
UtAddress2 = (cpuaddr)&UT_RAM_BLOCK.u32[4];

UT_RAM_BLOCK.u32[3] = 0xAABBCCDD;
UT_RAM_BLOCK.u32[3] = 0x44556677;
UT_RAM_BLOCK.u32[4] = 0x44556677;

UtAssert_INT32_EQ(CFE_PSP_MemRead32(UtAddress1, &Value1), CFE_PSP_SUCCESS);
UtAssert_INT32_EQ(CFE_PSP_MemRead32(UtAddress2, &Value2), CFE_PSP_SUCCESS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void rtems_sysmon_Init(uint32_t local_module_id)
rtems_sysmon_global.local_module_id = local_module_id;
}

static bool rtems_cpu_usage_vistor(Thread_Control *the_thread, void *arg)
static bool rtems_cpu_usage_visitor(Thread_Control *the_thread, void *arg)
{
rtems_sysmon_cpuload_state_t *state = (rtems_sysmon_cpuload_state_t *)arg;
rtems_sysmon_cpuload_core_t * core_p = &state->per_core[state->num_cpus];
Expand Down Expand Up @@ -466,7 +466,7 @@ static bool rtems_cpu_usage_vistor(Thread_Control *the_thread, void *arg)
void rtems_sysmon_update_stat(rtems_sysmon_cpuload_state_t *state)
{
state->num_cpus = 0;
rtems_task_iterate(rtems_cpu_usage_vistor, state);
rtems_task_iterate(rtems_cpu_usage_visitor, state);
}

rtems_task rtems_sysmon_Task(rtems_task_argument arg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ void Test_Aggregate_Nominal(void)
{
int32 StatusCode;
int32 IsRunningStatus;
;

CFE_PSP_IODriver_AdcCode_t Sample;
CFE_PSP_IODriver_AnalogRdWr_t RdWr = {.NumChannels = 1, .Samples = &Sample};
;

CFE_PSP_IODriver_Direction_t QueryDirArg;
CFE_PSP_IODriver_API_t * EntryAPI = TgtAPI->ExtendedApi;

Expand Down Expand Up @@ -181,7 +181,7 @@ void Test_Aggregate_Error(void)
int32 IsRunningStatus;
CFE_PSP_IODriver_AdcCode_t Sample;
CFE_PSP_IODriver_AnalogRdWr_t RdWr = {.NumChannels = 1, .Samples = &Sample};
;


/* Error Case: Look Up Subsystem Not Found */
StatusCode = EntryAPI->DeviceCommand(CFE_PSP_IODriver_LOOKUP_SUBSYSTEM, 0, 0, CFE_PSP_IODriver_CONST_STR("Empty"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ void Test_CFE_PSP_MemRangeSet(void)
UtAssert_INT32_EQ(CFE_PSP_MemRangeSet(UINT32_MAX, CFE_PSP_MEM_RAM, 0, 32, 1, 0), CFE_PSP_INVALID_MEM_RANGE);
UtAssert_INT32_EQ(CFE_PSP_MemRangeSet(0, 0, 0, 32, 1, 0), CFE_PSP_INVALID_MEM_TYPE);
UtAssert_INT32_EQ(CFE_PSP_MemRangeSet(0, CFE_PSP_MEM_RAM, 0, 32, 1, 0), CFE_PSP_INVALID_MEM_ATTR);
UtAssert_INT32_EQ(CFE_PSP_MemRangeSet(0, CFE_PSP_MEM_RAM, 0, 32, 1, 0), CFE_PSP_INVALID_MEM_ATTR);
UtAssert_INT32_EQ(CFE_PSP_MemRangeSet(0, CFE_PSP_MEM_RAM, 0, 32, 2, CFE_PSP_MEM_ATTR_READWRITE), CFE_PSP_SUCCESS);
UtAssert_INT32_EQ(CFE_PSP_MemRangeSet(0, CFE_PSP_MEM_RAM, 0, 32, 4, CFE_PSP_MEM_ATTR_READWRITE), CFE_PSP_SUCCESS);
UtAssert_INT32_EQ(CFE_PSP_MemRangeSet(0, CFE_PSP_MEM_RAM, 0, 32, 8, CFE_PSP_MEM_ATTR_READWRITE),
Expand Down

0 comments on commit 0811425

Please sign in to comment.