Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactor config dependent conditional in hs_custom.c #32

Closed
3 tasks done
skliper opened this issue Jun 13, 2022 · 0 comments · Fixed by #34
Closed
3 tasks done

Refactor config dependent conditional in hs_custom.c #32

skliper opened this issue Jun 13, 2022 · 0 comments · Fixed by #34
Assignees
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Jun 13, 2022

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the README file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Can't cover branch when HS_UTIL_CALLS_PER_MARK is 1 (since the counter is static local):

HS/fsw/src/hs_custom.c

Lines 180 to 195 in 2fc0dd9

void HS_UtilizationMark(void)
{
static uint32 CycleCount = 0;
CycleCount++;
if (CycleCount >= HS_UTIL_CALLS_PER_MARK)
{
HS_CustomData.LastIdleTaskInterval = HS_CustomData.ThisIdleTaskExec - HS_CustomData.LastIdleTaskExec;
HS_CustomData.LastIdleTaskExec = HS_CustomData.ThisIdleTaskExec;
CycleCount = 0;
}
return;
} /* end HS_UtilizationMark */

Describe the solution you'd like
Use the custom global to store config such that it can be set to get full coverage.

Describe alternatives you've considered
None

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the Draco milestone Jun 13, 2022
@skliper skliper self-assigned this Jun 13, 2022
@skliper skliper changed the title Refactor config dependent branch and unreachable loop condition branch in custom logic Refactor config dependent conditional in hs_custom.c Jun 13, 2022
skliper added a commit to skliper/HS that referenced this issue Jun 13, 2022
- Replace direct use of config value in conditional w/ global
- Replace redundant condition in search for empty diag slot
dzbaker added a commit that referenced this issue Jun 22, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant