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-03-30 #1258

Merged
merged 47 commits into from
Apr 1, 2021
Merged

cFE Integration candidate: 2021-03-30 #1258

merged 47 commits into from
Apr 1, 2021

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented Mar 24, 2021

Describe the contribution
Fix #1180, Removes impossible conditions
Fix #1002, Remove deprecated elements
Fix #1252, Squash potentially uninitialized variable warnings
Fix #1185, Squash possible uninitialized variable false alarms
Fix #1246, Typo in CFE_TBL_Validate AppName
Fix #1192, Initialize TotalMsgSize in CFE_SB_GetUserDataLength
Fix #1187, Increment CreatePipeErrorCounter for all create pipe errors
Fix #1186, Remove useless assignments/checks
Fix #1239, scrub include header guards
Fix #1194, check for NULL in SlotUsed helpers
Fix #1261, removed redundant checks for CFE_SUCCESS
Fix #1215, remove task registration calls
Fix #1223, shorten TestRunner function name
Fix #1264, Convert functional test startup script example to use "simple" filenames
Fix #1164, use FS file name parser for commands
Fix #1155, clean up zero copy API
Fix #1181, global variable cleanup
Fix #1206, report PSP version in ES HK TLM
Fix #1270, limit check in pool validation
Fix #1267, add null pointer check
Fix #1269, replace CFE_ES_ERR_BUFFER return for invalid null pointer arguments
Fix #1259, adds --branch-coverage option to genhtml line in lcov Makefile rule

Testing

cFE Tests https://github.com/nasa/cFE/pull/1258/checks
bundle tests https://github.com/nasa/cFS/pull/227/checks

Behavior Changes

PR #1237

Removes cases in cfe_es_apps.c and cfe_tbl_internal.c that could never hit the alternate condition since the condition was already checked

PR #1240

Removes all APIs deprecated in #777 and #998

PR #1253

Resolves CodeQL warnings on uninitialized variables.

PR #1241

Refactors a small portion of CFE_TIME_UnregisterSynchCallback and initializes variables to resolve "uninitialized variable" false alarms.

PR #1247

Fixes a typo in initialization in CFE_TBL_Validate( CFE_TBL_Handle_t TblHandle )

PR #1234

Initializes TotalMsgSize as 0 to avoid static analysis warning of "use before initialized"

PR #1245

Increments the CreatePipeErrorCounter for all create pipe errors to eliminate a trivial static analysis warning

PR #1236

Removes redundant or unreachable assignments and checks

PR #1262

Updates header guards to standard format. Converts some file-scope block comments to a doxygen format to include a summary of the file.

PR #1256

Enables the internal helper functions that determine table slot availability to handle NULL pointers.

PR #1263

Resolves static analysis warnings by removing redundant check for CFE_SUCCESS in CFE_EVS_EarlyInit

PR #1250

This API change affects cFS apps. Moves the invocation of CFE_PSP_AttachExceptions() from the registration function to the pre-entry function and removes all references to task registration in code, docs, and tests.

PR #1242

Renames CFE_TestRunner_AppMain as CFE_TR_AppMain so it is less than 20 characters long. Updates App file names in documentation for cfe_es_startup.scr.

PR #1229

Replace the call to CFE_SB_MessageStringGet() with the new filename-aware function CFE_FS_ParseInputFileName() for commands that contain file names like CFE_ES_StopPerfDataCmd. The default pathname/extension logic is now applied here too and only a "basename" is strictly necessary, although if a full/absolute path is given, it will be used as is.

PR #1257

Removes the now-unnecessary CFE_SB_ZeroCopyHandle_t type and all APIs that refer or require it .Replaces CFE_SB_ZeroCopyGetPtr() and CFE_SB_ZeroCopyReleasePtr() with two new simplified functions CFE_SB_AllocateMessageBuffer() and CFE_SB_ReleaseMessageBuffer() , respectively. These new functions do not use a separate handle. Updates the CFE_SB_TransmitBuffer() API to also remove the handle. Does affect public APIs.

PR #1254

Internal cleanup localized to ES implementation. Consolidate all ES global variables under the CFE_ES_Global struct. Removes the separate CFE_ES_TaskData and some random pointers that were stored at global scope. Adjusts all references to the deprecated items accordingly (search and replace).

PR #1255

Adds PSP version info to ES Housekeeping TLM messages. Changes both PSP and OSAL version info assignments on HK TLM to use the new version info API.

PR #1271

Fixes check for "NumBuckets" member to use <= instead of <. CFE_ES_GenPoolValidateState() now returns true if using the max number of buckets (17 by default) and the pool structure using max value will correctly validate

PR #1268

Replaces remaining CFE_ES_ERR_BUFFER with CFE_ES_BAD_ARGUMENT for when functions receive an invalid null-pointer argument. Adds null pointer checks in cfe_es_api.c.

PR #1260

Adds branch coverage to html report when running make lcov

Additional Context

Part of nasa/cFS#227

Authors

@skliper
@jphickey
@zanzaben
@astrogeco

jphickey and others added 16 commits March 16, 2021 16:57
For commands containing file names, replace the call to
CFE_SB_MessageStringGet() - which is just a basic copy - to
the new filename-aware function CFE_FS_ParseInputFileName().

This means that the default pathname/extension logic is applied
here too and only a "basename" is strictly necessary, although
if a full/absolute path is given, it will be used as is.
Explicit task registration is no longer necessary, since all
required actions can be done before invoking the entry point.

This moves the invocation of CFE_PSP_AttachExceptions() from
the registration function to the pre-entry function, this was
the only remaining action in task registration.

All references to task registration in code, docs, and tests
are removed.
Consolidate all ES global variables under a single CFE_ES_Global.

Removes the separate CFE_ES_TaskData as well as some random pointers
that were stored at global scope.

All references adjusted accordingly (search and replace).
Add PSP version info to ES Housekeeping TLM messages.
This is equivalent to OSAL version info.

Changes both to use the proper version API.
These are internal helper functions that determine if a table
slot corresponding to a given ID is in use or free/available.

This updates the function to handle NULL pointers even though
in context they are used the lookup should always work.
The separate zero copy handle type is removed.

Adds two new simplified functions CFE_SB_AllocateMessageBuffer
and CFE_SB_ReleaseMessageBuffer to replace CFE_SB_ZeroCopyGetPtr
and CFE_SB_ZeroCopyGetPtr.  These new functions do not use
a separate Handle.

Updates the CFE_SB_TransmitBuffer() API to also remove the handle.
astrogeco and others added 8 commits March 24, 2021 13:54
Fix #1252, Squash potentially uninitialized variable warnings
Fix #1185, Squash possible uninitialized variable false alarms
Fix #1246, Typo in CFE_TBL_Validate AppName
Fix #1192, Initialize TotalMsgSize in CFE_SB_GetUserDataLength
Fix #1187, Increment CreatePipeErrorCounter for all create pipe errors
astrogeco and others added 4 commits March 24, 2021 14:27
Fixes users guide error caused by Deprecated MSG API removal in #1240
All C header files should have a header guard matching the file
name of the header, in ALL_CAPS, with no extra leading/trailing
underscores.

This also takes a first pass at converting the file-scope block
comments to a doxygen format to include a summary of the file.
This removes cases where extra blank lines in comments were present.

This affects both the newly added blocks as well as some existing
cases where extra blank lines were inside block comments.
zanzaben and others added 18 commits March 25, 2021 11:03
Fix #1194, check for NULL in SlotUsed helpers
Fix #1261, Remove redundant checks in CFE_EVS_EarlyInit
Fix #1223, #1264 shorten TestRunner function name and update cfe_es_startup.scr docs
Fix #1164, use FS file name parser for commands
It is OK/valid if NumBuckets is the maximum value
Fix #1267, add null pointer check
Fix #1269, refactor CFE_ES_ERR_BUFFER to CFE_ES_BAD_ARGUMENT
Updates documentation for ZeroCopy Ptr APIs updated in #1257

Add "c" to code blocks in users guide markdown syntax
@astrogeco astrogeco marked this pull request as ready for review April 1, 2021 04:59
@astrogeco astrogeco merged commit 87025c7 into main Apr 1, 2021
@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