Fix #813, Add Generic Counter API test#1753
Fix #813, Add Generic Counter API test#1753astrogeco merged 2 commits intonasa:integration-candidatefrom
Conversation
Add tests for the following APIs: CFE_ES_RegisterGenCounter CFE_ES_CounterID_ToIndex CFE_ES_GetGenCounterIDByName CFE_ES_GetGenCounterName CFE_ES_GetGenCount CFE_ES_SetGenCount CFE_ES_IncrementGenCounter CFE_ES_DeleteGenCounter
e0cb579 to
33f66a9
Compare
|
This also depends on nasa/osal#1125, which is why CI is failing right now. Once the next OSAL merge cycle is complete should be able to re-run CI and confirm success.... |
zanzaben
left a comment
There was a problem hiding this comment.
Every test should have a UtPrintf("Testing: ..."); at the top stating which functions are being tested.
|
CCB:2021-08-04 APPROVED with CHANGES
|
At UtPrintf statements to indicate the APIs that the test is focused on.
|
Removing dependency label, as the required change is now in OSAL main branch, everything should be fine to merge normally now. |
| UtAssert_UINT32_LT(Idx, CFE_PLATFORM_ES_MAX_GEN_COUNTERS); | ||
|
|
||
| /* Confirm proper rejection of bad args in CFE_ES_CounterID_ToIndex */ | ||
| UtAssert_INT32_EQ(CFE_ES_CounterID_ToIndex(CFE_ES_COUNTERID_UNDEFINED, &Idx), CFE_ES_ERR_RESOURCEID_NOT_VALID); |
There was a problem hiding this comment.
CFE_ES_CounterID_ToIndex is being tested by #1716 so you don't need to check it here.
There was a problem hiding this comment.
Yeah, we wrote these tests in parallel. I don't see a real problem with testing it in two places, as they are slightly different variations. It doesn't hurt anything.
There was a problem hiding this comment.
alright just wanted to make sure we were aware.
- nasa/cFE#1734, Add table api functional tests - nasa/cFE#1753, Add Generic Counter API test
**Combines** - nasa/cFE#1772, v6.8.0-rc1+dev844 - nasa/osal#1127, v5.1.0-rc1+dev590 **Includes** *cFE* - nasa/cFE#1737, Move global count into test global struct. - nasa/cFE#1722, Add ES application control API functional tests - nasa/cFE#1743, Update coverage test to use UtAssert macros - nasa/cFE#1734, Add table api functional tests - nasa/cFE#1753, Add Generic Counter API test - nasa/cFE#1766, finish ES misc API functional test - nasa/cFE#1764, last char truncated in coverage log output - nasa/cFE#1728, Mistakes in some copyright headers - nasa/cFE#1767, Add misc time api functional test cFE - nasa/cFE#1749, Add Functional Test for EVS Reset Filters API - nasa/cFE#1781, RTEMS CFE_FT_Global build failure - nasa/cFE#1796, replace VOIDCALL assert macro *osal* - nasa/osal#1117, Add absolute branch coverage check
**Combines** - nasa/cFE#1772, v6.8.0-rc1+dev844 - nasa/osal#1127, v5.1.0-rc1+dev590 **Includes** *cFE* - nasa/cFE#1737, Move global count into test global struct. - nasa/cFE#1722, Add ES application control API functional tests - nasa/cFE#1743, Update coverage test to use UtAssert macros - nasa/cFE#1734, Add table api functional tests - nasa/cFE#1753, Add Generic Counter API test - nasa/cFE#1766, finish ES misc API functional test - nasa/cFE#1764, last char truncated in coverage log output - nasa/cFE#1728, Mistakes in some copyright headers - nasa/cFE#1767, Add misc time api functional test cFE - nasa/cFE#1749, Add Functional Test for EVS Reset Filters API - nasa/cFE#1781, RTEMS CFE_FT_Global build failure - nasa/cFE#1796, replace VOIDCALL assert macro *osal* - nasa/osal#1117, Add absolute branch coverage check 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]>
Describe the contribution
Add tests for the following APIs:
Fixes #813
Testing performed
Build and run all functional tests, confirm passing
Expected behavior changes
Additional APIs are tested
System(s) tested on
Ubuntu
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.