Skip to content

Incorrect assertions in network-api-test #692

@jphickey

Description

@jphickey

Describe the bug
The test is not correctly checking the return value in a few places. For example:

UtAssert_True(actual == OS_SUCCESS || OS_ERR_NOT_IMPLEMENTED, "OS_SocketAddrInit() (%ld) == OS_SUCCESS",

UtAssert_True(actual == OS_INVALID_POINTER || OS_ERR_NOT_IMPLEMENTED,

To Reproduce
Make the subject code return something other than OS_SUCCESS or OS_ERR_NOT_IMPLEMENTED. Assert statement will still be true.

Expected behavior
Probably should be actual == OS_SUCCESS || actual == OS_ERR_NOT_IMPLEMENTED

System observed on:
N/A - inspection

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Labels

bugunit-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