-
Notifications
You must be signed in to change notification settings - Fork 206
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-01-19 #1109
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- One return point - Eliminates "possible uninitialized variable" static analysis warning
Divide the "position" (in bytes) by the size of the event IDs to get the number of events. Also correct bad event checks in TBL UT.
Move certain definitions related to the CFE_ES_ResourceID_t type into the global CFE include files. This introduces two new headers: cfe_resourceid.h (public) cfe_resourceid_internal.h (private to CFE core apps) This allows other CFE core apps, such as SB, to use the CFE_ES_ResourceID_t using the same manipulators.
Significant refactor of many SB API calls to address inconsistencies with respect to locking and unlocking of global data structures. First this updates the definition of CFE_SB_PipeId_t to use the CFE_ES_ResourceID_t base type, and a new ID range. Notably this prevents direct access to the CFE_SB.PipeTbl global, forcing code to go through the proper lookup routine, which should only be done while locked. All API implementations follow the same general pattern: - Initial checks/queries while unlocked - Lock SB global - Lookups and/or modifications to the pipe table/routing info - Unlock SB global - Invoke other subsystems (e.g. OSAL) - Re-lock SB global (if needed) do final update, and unlock again - Send all events All error counters should be updated at the end, while still locked. All event processing is deferred to the end of each function, after all other processing is done.
Fix #1068, Create cFE Security Policy Markdown
Fix #904, Update cpuname targets.cmake documentation
Fix #1090, UT event check bounds
astrogeco
added a commit
to nasa/cFS
that referenced
this pull request
Jan 21, 2021
Fix #449, Add OS_printf to CFE_ES_SYSLOG_APPEND
Fix #933, Remove SenderReporting from SB global
Fix #954, Handle debug events in unit test
Fix #901, Remove UT_CheckForOpenSockets references
Fix #1052, Refactor UT_ClearForceFail to UT_ClearDefaultReturnValue
Fix #903, Add CFE_SB_GetUserData padding check
Fix #1073, software bus locking
@astrogeco - is it working now that you added #1077? #905 was marked as dependent. |
Yeah, I found it, sorry! |
I didn't catch the dependency on #1077 because it was in the comments. |
Define a data structure in cfe_sb_msg.h that will be used with the "write pipe info" command (CFE_SB_SEND_PIPE_INFO_CC). This allows the internal CFE_SB_PipeD_t descriptor object to evolve as needed without affecting the binary format of the file that is generated form this command, and items such as memory pointers may be excluded from the file.
Fix #982, separate pipeinfo file data structure
jphickey
force-pushed
the
integration-candidate
branch
from
January 26, 2021 15:28
7d0845c
to
79cfde6
Compare
Fix #1134, Add UtDebug output to CFE_ES_WriteToSysLog stub
Update ReadMe
astrogeco
force-pushed
the
integration-candidate
branch
from
January 27, 2021 00:09
4d03efa
to
f221911
Compare
astrogeco
added a commit
that referenced
this pull request
Jan 27, 2021
cFE Integration candidate: 2021-01-19
astrogeco
added a commit
to nasa/cFS
that referenced
this pull request
Jan 27, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the contribution
Fix #1074, Refactor CFE_TIME_RegisterSynchCallback
Fix #449, Add OS_printf to CFE_ES_SYSLOG_APPEND
Fix #488, Pad msg headers to 64 bit
Fix #903, Add CFE_SB_GetUserData padding check
Fix #877, Remove duplicate CFE_MISSION_REV define
Fix #901, Remove UT_CheckForOpenSockets references
Fix #904, Update cpuname targets.cmake documentation
Fix #1090, UT event check bounds
Fix #1052, Refactor UT_ClearForceFail to UT_ClearDefaultReturnValue
Fix #1068, Create Security Policy
Fix #933, Remove SenderReporting from SB global
Fix #985, globalize "resource ID" definitions
Fix #1073, refactor SB API for proper global locks
Fix #945, Finish CFE_PLATFORM_ES_PERF_MAX_IDS removal
Fix #954, Handle debug events in unit test
Fix #955, Remove OS_printf stub count checks in UT
Fix #1089, Cleanup strncpy use - unit tests
Fix #1089, Cleanup strncpy use - main code
Fix #932, Update UT for CFE_MISSION* string sizing
Fix #1134, Add UtDebug output to CFE_ES_WriteToSysLog stub
Testing performed
See https://github.com/nasa/cFS/pull/177/checks
Expected behavior changes
PR #1048 - Documentation: Add Security.md with instructions to report vulnerability
PR #1086 - Documentation: Update cpuname/MISSION_CPUNAMES documentation
PR #1091 - Fixes
UT_CheckEventHistoryFromFunc()
helper routine to read the correct number of IDs so it checks the correct number of events. Also correct bad event checks in TBL UT.PR #1076 - Adds
OS_printf
toCFE_ES_SYSLOG_APPEND
so it matchesCFE_ES_WriteToSysLog
PR #1099 - Removes unused
SenderReporting
andCFE_PLATFORM_SB_DEFAULT_REPORT_SENDER
PR #1106 - Tests pass when debug events are enabled via
CFE_PLATFORM_EVS_DEFAULT_TYPE_FLAG
in platform config.PR #1085 - Removes references to
UT_CheckForOpenSockets
which is no longer applicable since the UT framework resets the state for each unit test.PR #1053 - Rename
UT_ClearForceFail
asUT_ClearDefaultValue
given change in nasa/osal#724PR #905 - Adds checks that ensure
CFE_SB_GetUserData
works with all payload data types.PR #1077
CFE_SB_GetUserData
will work for message structures with elements up to 64 bitPR #1075 - Refactor
CFE_TIME_RegisterSynchCallback
to only have one return point and eliminates "possible uninitialized variable" static analysis warningPR #1092 - None of these changes are expected to cause problematic.
Addresses message delivery issues due to inconsistent locking by reworking cFE-SB API implementation. Ensures all events are generated and counters are incremented consistently by avoiding early returns in functions and using the
PendingEventID
register to record what event ID should be sent per the current operation.Employs the
CFE_ES_ResourceID_t
type and related patterns for managing the SB Pipe IDs. In particular this (intentionally) makes it not possibleWill break code which directly accessed these items without going through the lookup function.
CFE_SB_PipeId_t
type is no longer usable as a direct array index, increased in size from 8 to 32 bits, and is now consistent with all other ID types in both behavior and size.The "pipe stats" structure in the Pipe TLM is also changed. This structure contained a
CFE_SB_PipeId_t
value, hence why it had to be updated because the type is now bigger. The spare bytes are also moved to the end of the struct.PR #1107 - Removes
OS_printf
checks of stub calls in unit tests and checks for specific format string in history instead to confirm the right path was taken.PR #1084 - Removes
CFE_MISSION_REV
from platform config.PR #1104 - Removes the rest of the references and uses of
CFE_PLATFORM_ES_PERF_MAX_IDS
in favor ofCFE_MISSION_ES_PERF_MAX_IDS
PR #1098
CFE_MISSION_MAX_API_LEN
andCFE_MISSION_MAX_PATH_LEN
.&stingname[0]
tostringname
where observedPR #1135 - Make
CFE_ES_WriteToSysLog
stub unit test more informative by addingUtDebug
outputSystem(s) tested on
Ubuntu 18.04
Additional context
Part of nasa/cFS#177
Third party code
None
Contributor Info - All information REQUIRED for consideration of pull request
@skliper
@zanzaben
@ArielSAdamsNASA
@jphickey