Skip to content

Commit

Permalink
Merge pull request #130 from avan989/Fix-129-Address-Sanitizer
Browse files Browse the repository at this point in the history
Fix #129, Address Sanitizer
  • Loading branch information
dzbaker committed Jun 27, 2024
2 parents 0bdc746 + 2a9d8c3 commit 0ea03c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unit-test/hs_monitors_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,7 @@ void HS_MonitorUtilization_Test_CPUHogging(void)
HS_AppData.CurrentCPUHogState = HS_STATE_ENABLED;
HS_AppData.MaxCPUHoggingTime = 1;
HS_AppData.CurrentCPUHoggingTime = 0;
HS_AppData.CurrentCPUUtilIndex = HS_UTIL_PEAK_NUM_INTERVAL;
HS_AppData.CurrentCPUUtilIndex = HS_UTIL_PEAK_NUM_INTERVAL - 1;

/* test below the hogging threshold */
UT_SetDeferredRetcode(UT_KEY(HS_SysMonGetCpuUtilization), 1, HS_UTIL_PER_INTERVAL_HOGGING - 1);
Expand Down Expand Up @@ -1745,7 +1745,7 @@ void HS_MonitorUtilization_Test_CPUHoggingNotMax(void)
HS_AppData.CurrentCPUHogState = HS_STATE_ENABLED;
HS_AppData.MaxCPUHoggingTime = 2;

HS_AppData.CurrentCPUUtilIndex = HS_UTIL_PEAK_NUM_INTERVAL;
HS_AppData.CurrentCPUUtilIndex = HS_UTIL_PEAK_NUM_INTERVAL - 1;

UT_SetDeferredRetcode(UT_KEY(HS_SysMonGetCpuUtilization), 1, HS_CPU_UTILIZATION_MAX + 1);

Expand All @@ -1767,7 +1767,7 @@ void HS_MonitorUtilization_Test_CurrentCPUHogStateDisabled(void)
HS_AppData.CurrentCPUHogState = HS_STATE_DISABLED;
HS_AppData.MaxCPUHoggingTime = 1;

HS_AppData.CurrentCPUUtilIndex = HS_UTIL_PEAK_NUM_INTERVAL;
HS_AppData.CurrentCPUUtilIndex = HS_UTIL_PEAK_NUM_INTERVAL - 1;

UT_SetDeferredRetcode(UT_KEY(HS_SysMonGetCpuUtilization), 1, HS_CPU_UTILIZATION_MAX);

Expand Down

0 comments on commit 0ea03c3

Please sign in to comment.