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

"network-api-test" does not run successfully on VxWorks #988

Closed
jphickey opened this issue May 6, 2021 · 0 comments · Fixed by #993
Closed

"network-api-test" does not run successfully on VxWorks #988

jphickey opened this issue May 6, 2021 · 0 comments · Fixed by #993
Labels
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented May 6, 2021

Describe the bug
Running the "network-api-test" on VxWorks fails with several issues. The fcntl F_GETFL/F_SETFL calls return errno EINVAL followed by other failures.

To Reproduce
Run the "network-api-test" program on MCP750 w/VxWorks 6.9. Various failures are reported. Eventually the test hangs because a timeout test is reached, but timeouts do not function correctly due to issues with the previous fcntl F_GETFL calls.

Expected behavior
Test should pass.

System observed on:
MCP750 w/VxWorks 6.9

Additional context
This is partly related to modifications in PR #910/issue #863 which was a product of the CFS-38 review. Previously it would not check the result of the fcntl calls so the "selectable" flag was always set. Now the result is checked and the "selectable" flag only gets set if the flags were set. So the fcntl was always failing on VxWorks but it was previously ignored. But even if the O_NONBLOCK flag doesn't get set, select() should still be usable. The flag is mainly set as a protection in case two tasks call a blocking API at the same time.

Reporter Info
Joseph Hickey, Vantage Systems, Inc. (on behalf of JSC team)

@jphickey jphickey added the bug label May 6, 2021
@skliper skliper added this to the 6.0.0 milestone May 6, 2021
jphickey added a commit to jphickey/osal that referenced this issue May 7, 2021
In some versions of VxWorks the fcntl F_GETFL/F_SETFL opcodes
do not appear to be implemented, and thus it is not possible
to set O_NONBLOCK mode.  However, this mode is not necessarily
required, it is more of a backup/failsafe.

The "selectable" flag should not be dependent on whether
O_NONBLOCK flag got set.

This also adjust some timeouts and adds some delays to improve
the reliability of network-api-test on VxWorks.  The timeouts
were only 10ms, and this is much too short as messages are
getting written on a 9600 baud console (avg 1ms/char).  A
single log message can easily take 50-60ms alone.
jphickey added a commit to jphickey/osal that referenced this issue May 7, 2021
In some versions of VxWorks the fcntl F_GETFL/F_SETFL opcodes
do not appear to be implemented, and thus it is not possible
to set O_NONBLOCK mode.  However, this mode is not necessarily
required, it is more of a backup/failsafe.

The "selectable" flag should not be dependent on whether
O_NONBLOCK flag got set.

This also adjust some timeouts and adds some delays to improve
the reliability of network-api-test on VxWorks.  The timeouts
were only 10ms, and this is much too short as messages are
getting written on a 9600 baud console (avg 1ms/char).  A
single log message can easily take 50-60ms alone.
astrogeco added a commit that referenced this issue May 11, 2021
jphickey added a commit to jphickey/osal that referenced this issue Aug 10, 2022
Cast fixed width types to the type used in the printf call
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants