Skip to content

Assert return codes specified in API in functional tests #331

@mbenson1

Description

@mbenson1

I noticed that osal-core-test.c only tests if the function returns OS_SUCCESS or does NOT return OS_SUCCESS. It does not actually test that the return code is correct. For example, the test to ensure that the OSAL does not create a queue with a name that already exists does not actually test for OS_ERR_NAME_TAKEN. It merely passes if the return is not OS_SUCCESS. A quick spot check indicates this design pattern is systemic.

These unit tests were used to certify (per NPR7150A) the ARINC 653 version of CFS. This requires requirements have tracing back to tests. Testing the actual expected return code is a better pattern, but is required if there is an actual requirement defining the return codes.

Metadata

Metadata

Assignees

Labels

communityenhancementunit-testTickets related to the OSAL unit testing (functional and/or coverage)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions