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 #1691, Add External Time Source Functional Tests #1783

Merged

Conversation

zanzaben
Copy link
Contributor

Describe the contribution
Fixes #1691
Add External Time Source Functional Tests

Testing performed
Build and run unit test

Expected behavior changes
No impact to behavior

System(s) tested on
Ubuntu 20.04

Contributor Info - All information REQUIRED for consideration of pull request
Alex Campbell GSFC

@zanzaben zanzaben force-pushed the fix1691_Time_External_Func_Test branch from facea22 to 667d510 Compare August 10, 2021 16:37
@zanzaben zanzaben added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Aug 10, 2021
@zanzaben zanzaben force-pushed the fix1691_Time_External_Func_Test branch from 667d510 to ddba337 Compare August 11, 2021 14:00

UtAssert_INT32_EQ(CFE_TIME_RegisterSynchCallback(&TestCallbackFunction), CFE_SUCCESS);
UtAssert_INT32_EQ(CFE_TIME_RegisterSynchCallback(&TestCallbackFunction2), CFE_TIME_TOO_MANY_SYNCH_CALLBACKS);

Copy link
Contributor

Choose a reason for hiding this comment

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

How about adding a 2 sec delay and check the CallbackFunction is called at least once? Could use the FT count global... Not a big deal but would be an easy functional check.

#endif

UtPrintf("Testing: CFE_TIME_ExternalTone, CFE_TIME_ExternalMET, CFE_TIME_ExternalGPS, CFE_TIME_ExternalTime");

Copy link
Contributor

Choose a reason for hiding this comment

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

Worth a UtPrintf or comment here that the following time calls could impact the system timekeeping. Likely impact is incorrect time for one update cycle, a rejected external time update, multiple tone's or external updates detected, or similar. The call here confirms the implementation is properly included, more extensive timekeeping verification is a project/system responsibility.

@astrogeco astrogeco removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Aug 11, 2021
@astrogeco
Copy link
Contributor

CCB:2021-08-11 Needs more work

@astrogeco astrogeco added the CCB:Approved Indicates code review and approval by community CCB label Aug 11, 2021
@zanzaben
Copy link
Contributor Author

zanzaben commented Aug 12, 2021

Now it is ready
This current implementation of verifying the callback function is not 100% reliable yet.

@zanzaben zanzaben force-pushed the fix1691_Time_External_Func_Test branch from 2fb070a to 7c0d1b7 Compare August 12, 2021 18:43
Copy link
Contributor

@skliper skliper left a comment

Choose a reason for hiding this comment

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

Embedded...

modules/cfe_testcase/src/time_external_test.c Outdated Show resolved Hide resolved
modules/cfe_testcase/src/time_external_test.c Outdated Show resolved Hide resolved
modules/cfe_testcase/src/time_external_test.c Outdated Show resolved Hide resolved
@zanzaben zanzaben force-pushed the fix1691_Time_External_Func_Test branch from 7c0d1b7 to 2c07618 Compare August 12, 2021 19:19
@astrogeco astrogeco requested a review from skliper August 16, 2021 19:06
@astrogeco astrogeco changed the base branch from main to integration-candidate August 16, 2021 19:11
@astrogeco astrogeco merged commit ffc7778 into nasa:integration-candidate Aug 16, 2021
astrogeco added a commit that referenced this pull request Aug 16, 2021
 Fix #1691, Add External Time Source Functional Tests
astrogeco added a commit to nasa/cFS that referenced this pull request Aug 16, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Aug 17, 2021
**Combines**

nasa/cFE#1808, v6.8.0-rc1+dev873

**Includes**

- nasa/cFE#1790, Port "CFE_UtAssert_SuccessCheck" and related macros from coverage test to functional test #1784, add CFE assert macros to functional test
- nasa/cFE#1779, Adds invalid id syslog to for CFE_ES_DeleteApp and CFE_ES_ReloadApp and verifies required reporting
- nasa/cFE#1785, Stop memory leak & add cds size test.
- nasa/cFE#1765, Mark read only inputs as const
- nasa/cFE#1804, Check resource ID idx is less than max
- nasa/cFE#1778, Add ES Application Behavior Functional Tests
- nasa/cFE#1801, Update CFE_ES_RunLoop documentation
- nasa/cFE#1745, Add Message Api Functional Test
- nasa/cFE#1798, update in/out status and nonnull/nonzero tags
- nasa/cFE#1783, Add External Time Source Functional Tests
- nasa/cFE#1800, Add Perf API functional tests

Co-authored-by: Jacob Hageman <[email protected]>
Co-authored-by: Joseph Hickey <[email protected]>
Co-authored-by: Alex Campbell <[email protected]>
Co-authored-by: Niall Mullane <[email protected]>
Co-authored-by: Paul <[email protected]>
astrogeco added a commit to nasa/cFS that referenced this pull request Aug 17, 2021
**Combines**

nasa/cFE#1808, v6.8.0-rc1+dev873

**Includes**

- nasa/cFE#1790, Port "CFE_UtAssert_SuccessCheck" and related macros from coverage test to functional test #1784, add CFE assert macros to functional test
- nasa/cFE#1779, Adds invalid id syslog to for CFE_ES_DeleteApp and CFE_ES_ReloadApp and verifies required reporting
- nasa/cFE#1785, Stop memory leak & add cds size test.
- nasa/cFE#1765, Mark read only inputs as const
- nasa/cFE#1804, Check resource ID idx is less than max
- nasa/cFE#1778, Add ES Application Behavior Functional Tests
- nasa/cFE#1801, Update CFE_ES_RunLoop documentation
- nasa/cFE#1745, Add Message Api Functional Test
- nasa/cFE#1798, update in/out status and nonnull/nonzero tags
- nasa/cFE#1783, Add External Time Source Functional Tests
- nasa/cFE#1800, Add Perf API functional tests

Co-authored-by: Jacob Hageman <[email protected]>
Co-authored-by: Joseph Hickey <[email protected]>
Co-authored-by: Alex Campbell <[email protected]>
Co-authored-by: Niall Mullane <[email protected]>
Co-authored-by: Paul <[email protected]>
@zanzaben zanzaben deleted the fix1691_Time_External_Func_Test branch August 18, 2021 13:49
@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.

Add functional tests for cFE External Time Source APIs
3 participants