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 #1659, Add custom epoch support to TIME UT #1711

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

pepepr08
Copy link
Contributor

@pepepr08 pepepr08 commented Jul 26, 2021

Describe the contribution
Fixes #1659

  • CFE_TIME_Print is only function that uses the epoch defines. Avoid use of CFE_TIME_Print to test other Time functions and specifically check for the expected seconds and subseconds.
  • Print that Manual Inspection Required (MIR) is required when testing CFE_TIME_Print with a custom epoch.

Testing performed

  • Manually ran unit tests for TIME: $ make -C build/native/default_cpu1/time test
  • Verified coverage on files with $ gcov cfe_time_api.c.gcno and $ gcov cfe_time_api.c.gcno
  • Verified correct output when using default epoch time:
    [ PASS] 06.001 time_UT.c:847 - String: '1980-001-00:00:00.00000' == '1980-001-00:00:00.00000'
  • Verified correct output when using custom epoch time:
    [ MIR] 06.001 time_UT.c:851 - (MIR) Confirm adding seconds = 0, subseconds = 0 to configured EPOCH results in time 1980-001-00:00:09.00000

Expected behavior changes

Time unit tests will now pass, even when project is using a custom epoch time.

System(s) tested on

  • Ubuntu 18.04 VM

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

@pepepr08 pepepr08 requested a review from skliper July 26, 2021 19:26
modules/time/ut-coverage/time_UT.c Outdated Show resolved Hide resolved
@pepepr08 pepepr08 force-pushed the fix1659-time-ut branch 3 times, most recently from 0a83b4a to 4f8246d Compare July 26, 2021 20:06
@pepepr08 pepepr08 requested a review from skliper July 26, 2021 20:10
@pepepr08 pepepr08 added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jul 26, 2021
@zanzaben
Copy link
Contributor

Does time_current_test.c also need to be updated?

@pepepr08
Copy link
Contributor Author

Does time_current_test.c also need to be updated?

No need to update time_current_test.c. That file uses CFE_TIME_Print, but it only uses it to print out the time to log. It doesn't Assert the return value.

@skliper
Copy link
Contributor

skliper commented Jul 27, 2021

@excaliburtb This is the time test fix for your custom EPOCH.

@skliper skliper added this to the 7.0.0 milestone Jul 27, 2021
@astrogeco astrogeco changed the base branch from main to integration-candidate July 27, 2021 19:06
@astrogeco astrogeco merged commit ce97f45 into nasa:integration-candidate Jul 27, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Jul 27, 2021
nasa/cFE#1673, Add File Utility Functional Tests.

nasa/cFE#1711, Add custom epoch support to TIME UT
@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 Jul 28, 2021
@astrogeco
Copy link
Contributor

astrogeco commented Jul 28, 2021

CCB:2021-07-28 APPROVED with Changes

  • Open new issue to use configurable leap seconds
  • Open issue to add macro for manual inspection (MIR)

@skliper
Copy link
Contributor

skliper commented Jul 28, 2021

CCB:2021-07-28 APPROVED with Changes

  • Open new issue to use configurable leap seconds
  • Open issue to add macro for manual inspection (MIR)

Test overrides configured leap seconds, so no change needed.
Added #1725 and nasa/osal#1118 for MIR macro

astrogeco added a commit to nasa/cFS that referenced this pull request Jul 29, 2021
Combines:

nasa/cFE#1701, v6.8.0-rc1+dev789
nasa/osal#1116, v5.1.0-rc1+dev578
nasa/cFS-GroundSystem#192, v2.2.0-rc1+dev58

Includes:

**cFE**

nasa/cFE#1699, correct return code check
nasa/cFE#1700, documentation for FS APIs that return OSAL codes
nasa/cFE#1695, Adding coverage tests for cfe_es_apps.c
nasa/cFE#1673, Add File Utility Functional Tests.
nasa/cFE#1711, Add custom epoch support to TIME UT
nasa/cFE#1720, Requirements update for Caelum
nasa/cFE#1721, Add null check to CFE_ES_TaskID_ToIndex.
nasa/cFE#1719, scrub command documentation
nasa/cFE#1715, Add time arithmetic functional tests
nasa/cFE#1704, update docs for CFE_FS_BackgroundFileDumpRequest
nasa/cFE#1706, correct return code mismatches

**osal**

nasa/osal#1114, Add unit test branch coverage

**cFS-GroundSystem**

nasa/cFS-GroundSystem#185, Update tlm for ES Blockstats/memstats and TBL HK
nasa/cFS-GroundSystem#188, * might be referenced before assignment

Co-authored-by: Jacob Hageman <[email protected]>
Co-authored-by: Joseph Hickey <[email protected]>
Co-authored-by: Alex Campbell <[email protected]>
Co-authored-by: Jose F Martinez Pedraza <[email protected]>
Co-authored-by: Niall Mullane <[email protected]>
Co-authored-by: Paul <[email protected]>
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.

Hard coded time print format checks fail when non-default epoch is used
4 participants