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

cFE Integration candidate: 2021-04-27 #1431

Merged
merged 30 commits into from
Apr 29, 2021
Merged

cFE Integration candidate: 2021-04-27 #1431

merged 30 commits into from
Apr 29, 2021

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented Apr 28, 2021

Description

PR #1379

Fix #1317, memory pool pointer type

No behavior changes. Changes the type of pointer for MemPtr in CFE_ES_PoolCreateNoSem API from uint8* to void* to be more consistent and easier to use. Should be backward compatible.
Updates the doxygen documentation for this parameter, as it was incorrectly specifying a 32-bit alignment requirement.

PR #1289

Fix #809, ES child task functional test

Fixes #1291, typo in macro name

Adds new functional tests for ES Child Task API. Does not check edge cases. Fixed spelling mistake in UtAssert_ResourceID_Undifeined name

PR #1286

Fix #1285, Remove broken BUILDDIR reference

Removes BUILDDIR reference and an old comment. No behavior changes

PR #1305

Fix #1301, remove option for "osal_compatible"

Moves and renames cfe_resourceid_basevalue.h to cfe_resourceid_basevalue.h. Since it is is assumed/required that resource IDs follow the "osal compatible" pattern. Perhaps in a future version this could change, but

PR #1374

Fix #1311, CFE_SUCCESS constant type

Ensures that the CFE_SUCCESS constant is of the CFE_Status_t type. Since an explicit cast is required on all error codes that are expected to be negative values. No behavior change.

PR #1316

Fix #1314, Remove Unused Error Codes

Removes unused error codes: CFE_ES_ERR_SHELL_CMD and CFE_SB_NO_MSG_RECV. No impact to behavior.

PR #1370

Fix #1330, better warning about malformed startup line

When a startup file has a line with too many tokens the build script will generate a concise warning including an indicator of which line is causing the problem.

PR #1373

Fix #1338, check status of call to CFE_ES_CDS_CachePreload

Confirm that the call to CFE_ES_CDS_CachePreload returns CFE_SUCCESS before continuing. No behavior changes. Now shows up as untested lines in the coverage report since error condition cannot be exercised through coverage.

PR #1384

Fix #1340, update documentation for CFE_ES_DeleteCDS

[docs] Clarify that CFE_ES_DeleteCDS does not wipe or erase the block, it only returns resources to the pool for re-use.

PR #1385

Fix #1345, exception logic when app/task is not found

[docs] Adds comments in CFE_ES_RunExceptionScan describing the logic when an exception cannot be traced back to a specific app, in that it should fall back to the PSP reset.

PR #1372

Fix #1346, error if alignment size not a power of two

CFE_ES_GenPoolInitialize now returns CFE_ES_BAD_ARGUMENT error if the AlignSize passed-in value is not actually a power of two instead of "fixing" the alignment mask,

PR #1368

Fix #1349, remove unneeded CFE_ES_SYSLOG_APPEND macro

Replace internal CFE_ES_SYSLOG_APPEND macro with the CFE_ES_WriteToSysLog() API since coding standards discourage use of multi-line macros. No behavior change

PR #1382

Fix #1355, improve documentation for resourceID patterns

[docs] Improve Resource IDs documentation. Specifically on use of the various helper functions and common patterns Documents that the "IsMatch()" functions accept NULL pointers so they can be used with initial validation (gatekeeper). All other helper functions assume a non-NULL pointer.

PR #1371

Fix #1365, assert CFE_RESOURCEID_MAX is a bitmask

Compiler will catch if the CFE_RESOURCEID_MAX value changes in such a way that makes it not usable as a bit mask as intended. Add a compile time assert to ensure that CFE_RESOURCEID_MAX value is one less than a power of two (i.e. an LSB-justified bit mask). Notes in the comments that it serves as both a numeric limit and a mask.

Context

Part of nasa/cFS#250

Testing

cFE Tests https://github.com/nasa/cFS/pull/250/checks

cFS bundle Tests https://github.com/nasa/cFE/pull/1431/checks

Authors

@zanzaben
@jphickey
@skliper

skliper and others added 16 commits April 8, 2021 15:32
Currently it is assumed/required that resource IDs follow the "osal compatible"
pattern.  Perhaps in a future version this could change, but for now it is
simpler to just require this configuration, rather than having an option
with only one choice.

This renames/moves the header file but the content is not fundamentally changed.
Add a compile time assert to ensure that this value is
actually a power of two-1.  Notes in the comments that
it serves as both a numeric limit and a mask.
Instead of "fixing" the alignment mask, return an error if the
passed-in value is not actually a power of two.

In ES this only gets passed from two possible sources: one is
hardcoded (4) and the other is sourced from the ALIGN_OF macro.
Ensures that the CFE_SUCCESS constant is the CFE_Status_t type.
This improves the log message when a line in the startup script is
not formed correctly, such as being too long or having too many
tokens.
Changes the type of pointer in the API from uint8* to void* to be
more consistent and easier to use.  Should be backward compatible.

This also updates the doxygen documentation for this parameter, as
it was specifying a 32-bit alignment requirement whereas the
alignment requirement is processor dependent - 64 bit processors
typically will need 64 bit alignment.  Link to the macro which
is intended to aid in aligning the static pool buffer.
Improve the doxygen documentation on the various helper functions
and common patterns dealing with Resource IDs.  Specifically, document
that the "IsMatch()" functions specifically accept NULL pointers to
allow use with initial validation (gatekeeper), but all other helper
functions assume a non-NULL pointer.
Noted that this does not actually wipe or erase the block, it only
returns resources to the pool for re-use.
Adds comments to describe the logic when an exception cannot
be traced back to a specific app, in that it should fall back
to the PSP reset.

Restarting only an app is a special opt-in case that is only
done if specifically selected when starting the app, and the
exception is also positively traced back to that app.
Replace remaining uses of this internal macro with the
CFE_ES_WriteToSysLog API.
The function cannot fail in this context
Fix #1346, error if alignment size not a power of two
Fix #1349, remove unneeded CFE_ES_SYSLOG_APPEND macro
Fix #1355, improve documentation for resourceID patterns
@astrogeco astrogeco marked this pull request as ready for review April 29, 2021 01:55
@astrogeco astrogeco merged commit c8b5e00 into main Apr 29, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Apr 29, 2021
Combines:

nasa/cFE#1431
nasa/osal#975
nasa/sample_lib#61

Includes:

nasa/cFE#1379, memory pool pointer type
nasa/cFE#1289, ES child task functional test
nasa/cFE#1289, typo in macro name
nasa/cFE#1286, Remove broken BUILDDIR reference
nasa/cFE#1305, remove option for "osal_compatible"
nasa/cFE#1374, CFE_SUCCESS constant type
nasa/cFE#1316, Remove Unused Error Codes
nasa/cFE#1370, better warning about malformed startup line
nasa/cFE#1373, check status of call to `CFE_ES_CDS_CachePreload`
nasa/cFE#1384, update documentation for `CFE_ES_DeleteCDS`
nasa/cFE#1385, exception logic when app/task is not found
nasa/cFE#1372, error if alignment size not a power of two
nasa/cFE#1368, remove unneeded CFE_ES_SYSLOG_APPEND macro
nasa/cFE#1382, improve documentation for resourceID patterns
nasa/cFE#1371, assert `CFE_RESOURCEID_MAX` is a bitmask

nasa/osal#972, update documentation for read/write
nasa/osal#966, add "handler" feature to utassert stub API
nasa/osal#953, Adds local makefile and bundle/local unit test actions with coverage verification
nasa/osal#971, socket accept using incorrect record
nasa/osal#959, move async console option

nasa/sample_lib#60, replace direct ref to ArgPtr with macro
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment