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

Fix #465, Added UT tests for cFE ES Api #1623

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

pepepr08
Copy link
Contributor

Describe the contribution
Fixes #465
Completed code coverage on the following functions:

  • Test CFE_ES_ReloadApp bad AppID, core app, file doesn't exist
  • Test CFE_ES_GetAppID: NULL AppID pointer
  • Test CFE_ES_GetAppIDByName: NULL AppID pointer
  • Test CFE_ES_GetAppIDByName: NULL name pointer
  • Test CFE_ES_DeleteChildTask: Task inactive/invalid case
  • Test CFE_ES_RegisterCDS: NULL handle and NULL name

Testing performed
Steps taken to test the contribution:

  1. Compiled code and tests for ES
  2. Manually run coverage-es-ALL-testrunner and verify output of new tests
  3. Generated cfe_es_api.c.gcov and verified expected lines are now covered.

Expected behavior changes
Percentage of lines covered should increment.

System(s) tested on

  • Ubuntu 18.04.5 VM server

Contributor Info - All information REQUIRED for consideration of pull request
Jose F. Martinez Pedraza/NASA GSFC

@pepepr08 pepepr08 added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jun 15, 2021
@pepepr08 pepepr08 force-pushed the fix465-es-api-ut branch 2 times, most recently from 45e1ae5 to a9db63b Compare June 15, 2021 21:42
@astrogeco
Copy link
Contributor

CCB:2021-06-16 APPROVED

  • Will eventually replace UTReport macro, @jphickey will help do the change
    • For future reference, UT_Assert_INT32EQ is the preferred macro to check status

@pepepr08 pepepr08 requested a review from jphickey June 16, 2021 18:44
@pepepr08 pepepr08 force-pushed the fix465-es-api-ut branch 2 times, most recently from 744da71 to 3b93965 Compare June 16, 2021 18:46
Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calls to UtAssert_INT32_EQ look good. Only minor issue I see is with respect to "munging" the task ID - need to use the macros for this (CFE_ES_TASKID_C and CFE_RESOURCEID_TO_ULONG) so it will still work when strict type checking is turned on.

modules/es/ut-coverage/es_UT.c Outdated Show resolved Hide resolved
Test CFE_ES_ReloadApp bad AppID, core app, file doesn't exist
Test CFE_ES_GetAppID: NULL AppID pointer
Test CFE_ES_GetAppIDByName: NULL AppID pointer
Test CFE_ES_GetAppIDByName: NULL name pointer
Test CFE_ES_DeleteChildTask: Task inactive/invalid case
Test CFE_ES_RegisterCDS: NULL handle and NULL name
@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Jun 17, 2021
@pepepr08 pepepr08 requested a review from jphickey June 17, 2021 19:08
@astrogeco astrogeco changed the base branch from main to integration-candidate June 20, 2021 22:41
@astrogeco astrogeco merged commit 34f4b32 into nasa:integration-candidate Jun 23, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 23, 2021
nasa/cFE#1623, Added UT tests for cFE ES Api
nasa/cFE#1634, Expand CDS Functional Tests.
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 24, 2021
*Combines*

- nasa/elf2cfetbl#81
- nasa/tblCRCTool#52
- nasa/ci_lab#88
- nasa/sch_lab#83
- nasa/sample_app#150
- nasa/sample_lib#64
- nasa/to_lab#100

*Includes*

- nasa/cFE#1630, correct path to users guide warning log
- nasa/cFE#1621, add additional test cases for Child Tasks
- nasa/cFE#1608, Add cfe functional tests to CI
- nasa/cFE#1627, rename/clean CFE coverage assert macros
- nasa/cFE#1623, Added UT tests for cFE ES Api
- nasa/cFE#1634, Expand CDS Functional Tests.
- nasa/cFE#1633, add test log file
- nasa/cFE#1594, Event ID updates
- nasa/cFE#1624, scrub all UT_Report calls

- nasa/osal#1066, implement missing parameter/retcode test permutations

- nasa/cFS-GroundSystem#182, Add test start command script for cmdUtil
- nasa/tblCRCTool#51, add printf conversion casts

** Implement Coding Standard in CodeQL **

- nasa/cFS-GroundSystem#180
- nasa/elf2cfetbl#80
- nasa/tblCRCTool#49

- nasa/ci_lab#87
- nasa/sch_lab#79
- nasa/sample_app#149
- nasa/sample_lib#63
- nasa/to_lab#99
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 24, 2021
*Combines*

- nasa/cFE#1632, v6.8.0-rc1+dev726
- nasa/osal#1079, v5.1.0-rc1+dev548

- nasa/ci_lab#88, v2.4.0-rc1+dev42
- nasa/sch_lab#83, v2.4.0-rc1+dev40
- nasa/sample_app#150, v1.2.0-rc1+dev66
- nasa/sample_lib#64, v1.2.0-rc1+dev38
- nasa/to_lab#100, v2.4.0-rc1+dev49

- nasa/elf2cfetbl#81, v3.2.0-rc1+dev30
- nasa/tblCRCTool#52, v1.2.0-rc1+dev33
- nasa/cFS-GroundSystem#183, v2.2.0-rc1+dev52

*Includes*

- nasa/cFE#1630, correct path to users guide warning log
- nasa/cFE#1621, add additional test cases for Child Tasks
- nasa/cFE#1608, Add cfe functional tests to CI
- nasa/cFE#1627, rename/clean CFE coverage assert macros
- nasa/cFE#1623, Added UT tests for cFE ES Api
- nasa/cFE#1634, Expand CDS Functional Tests.
- nasa/cFE#1633, add test log file
- nasa/cFE#1594, Event ID updates
- nasa/cFE#1624, scrub all UT_Report calls

- nasa/osal#1066, implement missing parameter/retcode test permutations

- nasa/cFS-GroundSystem#182, Add test start command script for cmdUtil
- nasa/tblCRCTool#51, add printf conversion casts

** Implement Coding Standard in CodeQL **

- nasa/cFS-GroundSystem#180
- nasa/elf2cfetbl#80
- nasa/tblCRCTool#49

- nasa/ci_lab#87
- nasa/sch_lab#79
- nasa/sample_app#149
- nasa/sample_lib#63
- nasa/to_lab#99

Co-authored-by: Jacob Hageman <skliper@users.noreply.github.com>
Co-authored-by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored-by: Ariel Adams <ArielSAdamsNASA@users.noreply.github.com>
Co-authored-by: Alex Campbell <zanzaben@users.noreply.github.com>
Co-authored-by: Jose F Martinez Pedraza <pepepr08@users.noreply.github.com>
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incomplete coverage test for cfe_es_api.c
4 participants