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

OSAL Integration Candidate: 2020-12-22 #690

Merged
merged 22 commits into from
Dec 18, 2020
Merged

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented Dec 14, 2020

Describe the contribution
Combines IC-2020-12-15 and 2020-12-22

Fix #377 Add "OSAL Select" functional tests
Fix #410, breakup OSAL includes
Fix #542, Avoid UT failure if SEM_VALUE_MAX >= UINT32_MAX
Fix #569, Check and report sysconf error return
Fix #610, Add vxworks 7 support
Fix #670, clean up task definitions in core test
Fix #673 #677, improve global lock on POSIX
Fix #679, Convert OSAL Config Guide to markdown
Fix #686, Use errno in clock_getres error reporting
Fix #688, Implement macro to facilitate argument checking

Testing performed
See https://github.com/nasa/cFS/pull/162/checks

Expected behavior changes

PR #659 - Convert the OSAL Configuration Guide from docx and pdf to a markdown file.

PR #671 - Test Tasks do not run at 100%. Move all definitions and instantiations out of the core-test header file and reuse the already-existing single task definition.

PR #675 - Break up osapi-os-*.h files into units that correspond to the implementation units. Kept old header file names for compatibility.

PR #678 - Reworks the POSIX global lock implementation. Does not change the POSIX signal mask when locking/unlocking the global.

  • Fixes a race condition.
  • Adds a condition variable to the global lock structure. improves handling of tasks competing for access to the same object.
  • No longer changing signal masks repeatedly/unexpectedly. May be relevant to some BSP/driver developers.

PR #682 - Checks return of sysconf for error and reports them. Only sets PageSize on success. If sysconf fails it provides a mechanism to avoid error propagation.

PR #687 - Uses errno instead of status return from clock_getres with strerror reporting.

PR #599 - Adds support for VxWorks 7

System(s) tested on
Ubuntu 18.04

Additional context
Part of nasa/cFS#162

Third party code
None

Contributor Info - All information REQUIRED for consideration of pull request
@jphickey
@skliper
@zanzaben
@ArielSAdamsNASA

jphickey and others added 8 commits December 7, 2020 17:46
Move all definitions and instantiations out of the header file.
Reuse the single task definition that was already defined.

Also only define 3 instances of each type, as this is all that
the test actually uses (no need for 20).
This adds support for vxworks7 with its minor differences from vxworks6.
Includes compatibility wrappers for the old header names.

Refactors inclusions in all OSAL source files to only include
the components they actually use/refer to.

Refactor all inclusion guards to follow the same general
format (uppercase filename, no leading/trailing underscore)
Removes the signal mask updates from the POSIX global lock (not needed).
Adds a condition variable to the structure, which can be used to
directly wake up a waiting task rather than requiring that task to poll
the global state.
@astrogeco
Copy link
Contributor Author

@jphickey this is failing with OMIT_DEPRECATED, see https://github.com/nasa/cFS/pull/162/checks?check_run_id=1552281978. Was there a dependency I missed in #675 ?

Scanning dependencies of target cfe-core_es_UT
[ 77%] Building C object cfe-core/unit-test/CMakeFiles/cfe-core_es_UT.dir/es_UT.c.o
In file included from /home/runner/work/cFS/cFS/cfe/fsw/cfe-core/unit-test/es_UT.h:53:0,
                 from /home/runner/work/cFS/cFS/cfe/fsw/cfe-core/unit-test/es_UT.c:41:
/home/runner/work/cFS/cFS/osal/src/os/inc/osapi-os-loader.h:34:2: error: #error This header header is deprecated
 #error This header header is deprecated
  ^~~~~
cfe-core/unit-test/CMakeFiles/cfe-core_es_UT.dir/build.make:81: recipe for target 'cfe-core/unit-test/CMakeFiles/cfe-core_es_UT.dir/es_UT.c.o' failed
make[7]: *** [cfe-core/unit-test/CMakeFiles/cfe-core_es_UT.dir/es_UT.c.o] Error 1
CMakeFiles/Makefile2:6310: recipe for target 'cfe-core/unit-test/CMakeFiles/cfe-core_es_UT.dir/all' failed

@astrogeco
Copy link
Contributor Author

Merged nasa/cFE#1043 which I think will fix this

@jphickey
Copy link
Contributor

@jphickey this is failing with OMIT_DEPRECATED, see https://github.com/nasa/cFS/pull/162/checks?check_run_id=1552281978. Was there a dependency I missed in #675 ?

Confirmed - nasa/cFE#1043 that you already found was the correct/intended fix for this dependency.

Add macros for configurable behavior of argument bug checking.

- BUGCHECK for checking argument values which should never happen
   and indicate bugs if they do.
- ARGCHECK for checking argument values which may happen and can
   be mitigated if they do.

The behavior of BUGCHECK is influenced by two new OSAL config
options, which can disable it completely or make it strict/enforcing
such that it will abort() for debugging if a condition is not met.
Use the new macros to validate arguments to OS API calls.

Also includes coverage test updates, which revealed some
areas where return types were not consistent, and the macro
makes them consistent now.
zanzaben and others added 7 commits December 16, 2020 16:01
@astrogeco astrogeco changed the title OSAL Integration Candidate: 2020-12-15 OSAL Integration Candidate: 2020-12-22 Dec 18, 2020
Fix #542, Avoid UT failure if SEM_VALUE_MAX >= UINT32_MAX
Fix #688, implement value check and bug report macros
@astrogeco astrogeco marked this pull request as ready for review December 18, 2020 17:23
@astrogeco astrogeco merged commit d698a4d into main Dec 18, 2020
astrogeco added a commit to nasa/cFS that referenced this pull request Dec 18, 2020
@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