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: 2021-03-02 #835

Merged
merged 12 commits into from
Mar 4, 2021
Merged

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented Mar 1, 2021

Describe the contribution
Fix #833 - Initializes the file descriptor (output parameter) for all cases in OS_OpenCreate
Fix #795 - Adds all the currently possible source files for VxWorks to coverage statistics and adds coverage tests
Fix #780, restrict permissions on file create
Fix #828, Change the comment style
Fix #821, OSAL should have a "OS_GetVersionString()" function

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

Expected behavior changes
PR #834 - Avoids various "possible uninitialized variable" warnings for routines that utilize this API.

PR #826 - Renames sockaddr* structures to sa* to deconflict from structure name in os-impl-bsd-sockets.c. Adds OS_NETWORK_SUPPORTS_IPV6 to os-impl-bsd-sockets.c compilation. Renames bsd-select-stubs.c to sys-select-stubs.c. Coverage now includes all currently possible files in VxWorks build

PR #827 - Resolves CodeQL security warning by restricting permissions on file create.

PR #829 - Changes comments using "cpp" comment style to "c" style

PR #824 - Adds new accessor functions APIs to get version strings and return the values of string macros defined in osapi-version.h.

  1. The "simple" version currently OS_VERSION macro - this is the semantic version without any extra detail. This is returned by OS_GetVersion().
  2. The "descriptive" version in OS_VERSION_STRING macro - this has extra detail like the most recent official release. This is returned by OS_GetVersionDescription().
  3. The release code name, now returned by OS_GetVersionDescription().

These functions are the preferred way to get the OSAL version string, from now on users should avoid using the macro definitions as it is evaluated at OSAL library compile time, rather than application compile time, and thus will remain correct in the event that OSAL is relinked without recompiling the application.
Adds osapi-version.c to implement these 3 calls and associated coverage test. This allows the version.c file to be auto-generated in the future.

System(s) tested on
Ubuntu 18.04

Additional context
Part of nasa/cFS#204

Third party code
None

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

astrogeco and others added 6 commits March 1, 2021 17:05
Fix #795, Add uncovered vxworks source files to coverage statistics
Fix #780, restrict permissions on file create
Adds 4 version API calls:

const char *OS_GetVersionString(void);
const char *OS_GetVersionCodeName(void);
void OS_GetVersionNumber(uint8[4]);
uint32 OS_GetBuildNumber(void);

These return the values of current macros in osapi-version.h.

The accessor function should be the preferred way to get the OSAL version
info (vs. using macro directly) as it is evaluated at OSAL library
compile time, rather than application compile time, and thus will
remain correct in the event that OSAL is relinked without recompiling
the application.
Fix #821, add accessor functions for version strings

Fix format in `osapi-utstub-version.c`
@astrogeco astrogeco marked this pull request as ready for review March 3, 2021 19:38
@astrogeco astrogeco merged commit 3b53af0 into main Mar 4, 2021
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
jphickey added a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Fixup the table build targets so it will be invoked
for both static and dynamic apps.  Improve the prep
log messages to indicate the targets that tables
will be built for for both static and dynamic apps.
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment