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 #988, do not require nonblock mode #993

Merged

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented May 7, 2021

Describe the contribution
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.

Fixes #988

Testing performed
Execute network-api-test on supported platforms (esp. VxWorks 6.9 in particular)

Expected behavior changes
Test now passes reliably.

System(s) tested on
Ubuntu 20.04 (native)
VxWorks 6.9 (MCP750)

Additional context
This also requires/depends on #992 for reliable operation. The console mutex is required to ensure that the various information messages from the client/server tasks inside network-api-test do not clobber eachother, but it also helps synchronize them too.

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

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 jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 7, 2021
@astrogeco astrogeco changed the base branch from main to integration-candidate May 11, 2021 17:34
@astrogeco astrogeco merged commit a61ed02 into nasa:integration-candidate May 11, 2021
@astrogeco astrogeco requested a review from a user May 11, 2021 17:36
astrogeco added a commit to nasa/cFS that referenced this pull request May 11, 2021
nasa/osal#992, add local mutex to BSP console

nasa/osal#993, do not require nonblock mode
@astrogeco astrogeco removed the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 12, 2021
@astrogeco
Copy link
Contributor

astrogeco commented May 12, 2021

CCB:2021-05-12 APPROVED

  • extends timeouts to help tests work on VxWorks

astrogeco added a commit to nasa/cFS that referenced this pull request May 12, 2021
nasa/cFE#1492, cFE v6.8.0-rc1+dev575
nasa/osal#996, osal v5.1.0-rc1+dev434

nasa/cFE#1487, Remove broken travis-ci script
nasa/cFE#1463, generated coverage stubs for CFE core
nasa/cFE#1463, Move CFE_FS_RunBackgroundFileDump to internal API
nasa/cFE#1451, OSAL config file simplification
nasa/cFE#1489, removes --quiet option so files checked go to stdout

nasa/osal#978, configuration guide updates
nasa/osal#974, improve documentation of UtAssert API calls
nasa/osal#977, update OS_TaskCreate doc
nasa/osal#997, Enable cppcheck results output
nasa/osal#980, Scrub return values
nasa/osal#992, add local mutex to BSP console
nasa/osal#993, do not require nonblock mode
astrogeco added a commit to nasa/cFS that referenced this pull request May 12, 2021
nasa/cFE#1492, cFE v6.8.0-rc1+dev575
nasa/osal#996, osal v5.1.0-rc1+dev434

nasa/cFE#1487, Remove broken travis-ci script
nasa/cFE#1463, generated coverage stubs for CFE core
nasa/cFE#1463, Move CFE_FS_RunBackgroundFileDump to internal API
nasa/cFE#1451, OSAL config file simplification
nasa/cFE#1489, removes --quiet option so files checked go to stdout

nasa/osal#978, configuration guide updates
nasa/osal#974, improve documentation of UtAssert API calls
nasa/osal#977, update OS_TaskCreate doc
nasa/osal#997, Enable cppcheck results output
nasa/osal#980, Scrub return values
nasa/osal#992, add local mutex to BSP console
nasa/osal#993, do not require nonblock mode

Co-authored-by: Jacob Hageman <[email protected]>
Co-authored-by: Joseph Hickey <[email protected]>
@jphickey jphickey deleted the fix-988-network-api-test branch May 14, 2021 13:55
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"network-api-test" does not run successfully on VxWorks
3 participants