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 #1024, check misc API return codes #1030

Merged

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Correct missing doxygen retvals and other discrepancies between test and documentation

Note, other tests were OK, but depend on support being enabled and supported by RTOS. Script will report N/A items (due to no impl) as missing. Confirmed OS_HeapGetInfo() is OK on RTEMS.

Fixes #1024

Testing performed
Run unit tests, revalidate test log against documentation

Expected behavior changes
No change to FSW, test/doc only

System(s) tested on
Ubuntu
RTEMS 4.11

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 19, 2021
@jphickey jphickey force-pushed the fix-1024-api-test-retcodes branch from 327b181 to 8989f7b Compare May 19, 2021 20:53
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.

OS_ShellOutputToFile overloads undefined and NULL test. Should be separate tests (one for NULL pointer, one for OS_OBJECT_ID_UNDEFINED returns OS_ERR_INVALID_ID.

@jphickey jphickey force-pushed the fix-1024-api-test-retcodes branch from 8989f7b to e3bd1ad Compare May 21, 2021 14:49
@jphickey
Copy link
Contributor Author

jphickey commented May 21, 2021

Commit e54acfc fixes the OS_ShellOutputToFile test by moving the null pointer test to be after setup (where the file ID is valid).

This also changes the tests done before OS_API_Init() - instead of checking specifically for OS_ERROR (which is not specifically documented) this just checks that the result is not success. Technically, calling any other API before OS_API_Init is not valid an no specific behavior is completely guaranteed here.

Fix missing doxygen retvals

Note, other tests were OK, but depend on support being enabled and
supported by RTOS.  Script will report N/A items (due to no impl) as
missing.  Confirmed OS_HeapGetInfo OK on RTEMS.

For test cases where a function is invoked before OS_API_Init, only
check that the result is not success.  This will remain as "undocumented"
behavior - users should not call functions before init, because it is
not valid to do so.  A specific error code is not guaranteed here.
@jphickey jphickey force-pushed the fix-1024-api-test-retcodes branch from e3bd1ad to e54acfc Compare May 21, 2021 14:55
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.

OS_ShellOutputToFile needs ID UNDEFINED test returns INVALID ID
EDIT - Turned into a request for change.

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.

OS_ShellOutputToFile needs ID UNDEFINED test returns INVALID ID

@skliper skliper dismissed their stale review May 26, 2021 13:45

This will be fixed in #1052

@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels May 26, 2021
@astrogeco astrogeco changed the base branch from main to integration-candidate June 2, 2021 01:51
@astrogeco astrogeco merged commit 36a2923 into nasa:integration-candidate Jun 2, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 2, 2021
Update nasa/osal#1058

Includes:

nasa/osal#1044, resolve discrepancies between mutex API and unit tests
nasa/osal#1038, resolve discrepancies between queue API and unit tests
nasa/osal#1037, resolve discrepancies between task API and unit tests
nasa/osal#1051, resolve discrepancies between timebase API and unit tests

nasa/osal#1030, check misc API return codes
nasa/osal#1039, Rename CodeQL cFE Build and add Duplicate Job
nasa/osal#1049, filter only whole words for keyword match
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 2, 2021
Update nasa/osal#1058

Includes:

nasa/osal#1044, resolve discrepancies between mutex API and unit tests
nasa/osal#1038, resolve discrepancies between queue API and unit tests
nasa/osal#1037, resolve discrepancies between task API and unit tests
nasa/osal#1051, resolve discrepancies between timebase API and unit tests

nasa/osal#1030, check misc API return codes
nasa/osal#1039, Rename CodeQL cFE Build and add Duplicate Job
nasa/osal#1049, filter only whole words for keyword match
@jphickey jphickey deleted the fix-1024-api-test-retcodes branch June 8, 2021 18:22
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 8, 2021
- #263, bundle

Combines:

- nasa/cFE#1584, v6.8.0-rc1+dev642
- nasa/osal#1058, v5.1.0-rc1+dev500
- nasa/sch_lab#82, v2.4.0-rc1+dev36

Includes:

- nasa/cFE#1580, Update ES verify errors to match test
- nasa/cFE#1578, Resolve mismatched endforeach of CMakeList.txt
- nasa/cFE#1579, Improve event filter documentation
- nasa/cFE#1576, EVS/FS documentation cleanup
- nasa/cFE#1575, Remove shell file subtype and clarify scope
- nasa/cFE#1582, Simplify file open/truncate logic
- nasa/cFE#1567, Remove deprecated elements
- nasa/cFE#1556, Replace Header Content Type magic number
- nasa/cFE#1553, Remove unused EVS LogMode defines
- nasa/cFE#1570, Document cleanup from SB/MSG/SBR review, Remove unused CFE_SB_NO_SUBSCRIBERS
- nasa/cFE#1565, Add CFE_SB_DestinationD tag and use for pointers
- nasa/cFE#1564, Use CFE_MSG_SequenceCount_t for seqcnt type
- nasa/cFE#1562, Document CFE_ES_PoolCreateEx NumBlockSizes error handling
- nasa/cFE#1560, Documentation cleanup in TBL/TIME
- nasa/cFE#1558, Document TblName as app specific
- nasa/cFE#1563, use OSAL script to generate API guide
- nasa/cFE#1557, Include verify headers to validate config
- nasa/cFE#1555, add doxygen aliases for OSAL parameter/retvals

- nasa/osal#1033, include doxygen targets locally
- nasa/osal#1031, Document OS_ObjectIdToArrayIndex as public
- nasa/osal#1040, resolve discrepancies between binsem API and unit tests
- nasa/osal#1029, add missing clock retcode tests
- nasa/osal#1046, resolve discrepancies between common API and unit tests
- nasa/osal#1041, resolve discrepancies between countsem API and unit tests
- nasa/osal#1045, resolve discrepancies between dir API and unit tests
- nasa/osal#1043, resolve discrepancies between module API and unit tests
- nasa/osal#1044, resolve discrepancies between mutex API and unit tests
- nasa/osal#1038, resolve discrepancies between queue API and unit tests
- nasa/osal#1037, resolve discrepancies between task API and unit tests
- nasa/osal#1051, resolve discrepancies between timebase API and unit tests
- nasa/osal#1030, check misc API return codes
- nasa/osal#1039, Rename CodeQL cFE Build and add Duplicate Job
- nasa/osal#1049, filter only whole words for keyword match
- nasa/osal#962, update OSAL Config Guide link

- nasa/sch_lab#81, exit the main loop if init fails

- HOTFIX cFS-bundle, Use new osalguide logfile to fix documentation build
workflow errors,
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 8, 2021
- #263, bundle

Combines:

- nasa/cFE#1584, v6.8.0-rc1+dev642
- nasa/osal#1058, v5.1.0-rc1+dev500
- nasa/sch_lab#82, v2.4.0-rc1+dev36

Includes:

- nasa/cFE#1580, Update ES verify errors to match test
- nasa/cFE#1578, Resolve mismatched endforeach of CMakeList.txt
- nasa/cFE#1579, Improve event filter documentation
- nasa/cFE#1576, EVS/FS documentation cleanup
- nasa/cFE#1575, Remove shell file subtype and clarify scope
- nasa/cFE#1582, Simplify file open/truncate logic
- nasa/cFE#1567, Remove deprecated elements
- nasa/cFE#1556, Replace Header Content Type magic number
- nasa/cFE#1553, Remove unused EVS LogMode defines
- nasa/cFE#1570, Document cleanup from SB/MSG/SBR review, Remove unused CFE_SB_NO_SUBSCRIBERS
- nasa/cFE#1565, Add CFE_SB_DestinationD tag and use for pointers
- nasa/cFE#1564, Use CFE_MSG_SequenceCount_t for seqcnt type
- nasa/cFE#1562, Document CFE_ES_PoolCreateEx NumBlockSizes error handling
- nasa/cFE#1560, Documentation cleanup in TBL/TIME
- nasa/cFE#1558, Document TblName as app specific
- nasa/cFE#1563, use OSAL script to generate API guide
- nasa/cFE#1557, Include verify headers to validate config
- nasa/cFE#1555, add doxygen aliases for OSAL parameter/retvals

- nasa/osal#1033, include doxygen targets locally
- nasa/osal#1031, Document OS_ObjectIdToArrayIndex as public
- nasa/osal#1040, resolve discrepancies between binsem API and unit tests
- nasa/osal#1029, add missing clock retcode tests
- nasa/osal#1046, resolve discrepancies between common API and unit tests
- nasa/osal#1041, resolve discrepancies between countsem API and unit tests
- nasa/osal#1045, resolve discrepancies between dir API and unit tests
- nasa/osal#1043, resolve discrepancies between module API and unit tests
- nasa/osal#1044, resolve discrepancies between mutex API and unit tests
- nasa/osal#1038, resolve discrepancies between queue API and unit tests
- nasa/osal#1037, resolve discrepancies between task API and unit tests
- nasa/osal#1051, resolve discrepancies between timebase API and unit tests
- nasa/osal#1030, check misc API return codes
- nasa/osal#1039, Rename CodeQL cFE Build and add Duplicate Job
- nasa/osal#1049, filter only whole words for keyword match
- nasa/osal#962, update OSAL Config Guide link

- nasa/sch_lab#81, exit the main loop if init fails

- HOTFIX cFS-bundle, Use new osalguide logfile to fix documentation build
workflow errors,

Co-authored-by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored-by: Jake Hageman skliper <skliper@users.noreply.github.com>
Co-authored-by: Alex Campbell <zanzaben@users.noreply.github.com>
Co-authored-by: Ariel Adams <ArielSAdamsNASA@users.noreply.github.com>
Co-authored-by: Ross Peters <rosspeters6@users.noreply.github.com>
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
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.

Unit test status code discrepancies in other public headers
3 participants