-
Notifications
You must be signed in to change notification settings - Fork 217
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 #285, Refactor OSAL to avoid inclusion of C files #443
Fix #285, Refactor OSAL to avoid inclusion of C files #443
Conversation
This is a rebase of original PR #427 which was CCB reviewed in a special session on 2020-04-22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is osal/src/unit-test-coverage/posix/adaptors/Makefile still used for anything?
Actually the entire POSIX subdirectory in coverage is more or less a placeholder for future use. We could remove the entire thing with no loss of function, it was only a starting point for someone to actually implement. Should I do that? |
I thought we were using CMake, even for the coverage build? Just not following why any of the adaptor/Makefile files still exist? If they are useful or a placeholder, no need to remove. |
Correct. Makefile is not used and not useful in any circumstance. But on second look, the code in this subdir is also no longer even useful as a template for a future developer because it references files which no longer exist and the README is outdated etc etc. That's why I'm thinking just remove the entire subdir. New developer should use VxWorks as the reference point if there is a desire to implement coverage on POSIX. Existing template for POSIX is probably of negative usefulness as it will point in wrong direction, and no time budget to update it right now. |
I'd suggest removing whatever Makefile/README's are no longer applicable. If all of POSIX is out of date feel free to remove. |
@jphickey can we split this up into smaller commits? |
Use separate source files and CMake-based source selection to configure OSAL features, rather than using the C preprocessor. All implementation units now provide a separate header file for each functional group/subsystem. This commit covers the OSAL main FSW code and particularly the "portable" implementation blocks to follow this model. Includes minor updates to UT stubs due to header file changes.
Use separate source files and CMake-based source selection to configure OSAL features, rather than using the C preprocessor. This commit covers the OSAL coverage test. This had been using inclusion of a C file to allow access to static functions/variables. This updates all UT code to correspond with the FSW code changes. All "static" helper functions become non-static so unit test can invoke directly. Prototype is in a private header, so the functions are still not exposed in the API.
a24d6de
to
52faabd
Compare
Permissive mode is required for testing on POSIX when running as a normal (non-root) user.
52faabd
to
a9c0205
Compare
Force Pushed to split into several commits. This splits between FSW and coverage test changes. The bulk of the file-level changes are actually on the unit-test-coverage stuff. In particular @skliper please have a look at the last commit a9c0205, which is the suggested method to enable permissive mode for CI now. |
The "include()" cmake function only read the first file when passed a list. Adding a foreach loop supports allowing a list of files which is useful for adding and override/addendum file to a base config.
The "include()" cmake function only read the first file when passed a list. Adding a foreach loop supports allowing a list of files which is useful for adding and override/addendum file to a base config.
I'm good with a9c0205 |
Definitions within osconfig.h are referenced by doxygen in other source code files, so this should also include doxygen-formatted descriptions of each macro defined by this template file.
issue nasa#443, update toolchain-ppc-vxworks6.9
Describe the contribution
Use separate source files and CMake-based source selection
based on feature configuration, rather than using the C
preprocessor for including/excluding different OSAL function
groups.
Refactor all implementation units to provide a separate header
file for each functional group/subsystem. Remove "static"
declaration on internal helper functions so they can be invoked
from unit test.
Fixes #285
Also Fix #214 and fix #195 (trivial fixes rolled in as part of refactoring)
Testing performed
Build and execute CFE for VxWorks, POSIX and RTEMS. Sanity check of CFE functions. Confirm all unit tests passing and coverage test of VxWorks is working. Also confirm build with each inclusion/exclusion of each option (loader, network, shell) and with/without OMIT_DEPRECATED.
Expected behavior changes
No impact to runtime code. Changes build system considerably, however.
osconfig.h
file - now replaced by a cmake configuration fileSystem(s) tested on
Ubuntu 20.04 LTS 64 bit (build host, native test)
i686-rtems4.11 cross build using QEMU
ppc-vxworks6.9 cross build using MCP750
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.