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

Integration Candidate 2020-05-20 #482

Merged
merged 33 commits into from
May 29, 2020
Merged

Integration Candidate 2020-05-20 #482

merged 33 commits into from
May 29, 2020

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented May 26, 2020

Describe the contribution
Fix #293
Fix #374
Fix #447
Fix #450
Fix #454
Fix #455
Fix #457
Fix #459
Fix #470
Fix #474
Fix #476

Testing Performed
Bundle CI - https://travis-ci.com/github/nasa/cFS/builds/168822512

Expected behavior changes

PR #439 - Add functional tests for OS_IdentifyObject, OS_ConvertToArrayIndex and OS_ForEachObject functions.

PR #451 - Fix doxygen warnings

PR #463 - Unit test cases which use OS_statfs and run on an RTEMS IMFS volume will be skipped and categorized as "NA" due to OS_ERR_NOT_IMPLEMENTED response, rather than a failure.

PR #464 - The device_name field was using the wrong length, it should be of OS_FS_DEV_NAME_LEN Also correct another length check on the local path name.

PR #465 - For RTEMS, will not shutdown the kernel if test abort occurs.

PR #466 - Unit tests work on RTEMS without BSP preallocating ramdisks

PR #468 - If OSAL_EXT_SOURCE_DIR cache variable is set, this location will be checked first for a BSP/OS implementation layer.

PR #469 - Implement OS_GetResourceName() and OS_ForEachObjectOfType(), which are new functions that allow for additional query capabilities. No impact to current behavior as the FSW does not currently use any of these new APIs.

PR #472 -

  • A functional test enhancement to bin-sem-test which replicates the specific conditions for the observed bug to occur. Deletes the task calling OS_BinSemTake() and then attempts to use the semaphore after this.
  • Employ a pthread "cleanup handler" to handle the situation where a task is canceled during the pthread_cond_wait() call. This ensures that the mutex is unlocked as part of the cleanup, so other tasks may continue using the semaphore.
  • Change all initial mutex locking to be a finite "timed" wait rather than an infinite wait. In all cases, the condition variable is only held for brief periods of time and should be readily available. If a task blocks for a long time, this considers the mutex "broken" and aborts, thereby avoiding deadlock. This is a "contingency" fix in that if an exception or signal or other unknown/unhandled async event occurs that leaves the mutex permanently locked.

PR #475 - Adds the mutex to protect the timer callback timecb resource table.

System(s) tested on
See PRs

Additional context
Part of nasa/cFS#91

Third party code
If included, identify any third party code and provide text file of license

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.
Leor Bleier, NASA-GSFC
Yasir Khan, NASA-GSFC

lbleier-GSFC and others added 26 commits May 8, 2020 09:22
The statvfs() call depends on the underlying filesystem
supporting this.  On RTEMS, the IMFS filesystem type
does not, and it returns the ENOSYS errno.  This is better
translated to OS_ERR_NOT_IMPLEMENTED rather than OS_ERROR.
Rather than relying on the BSP to preallocate, the ram disk
block devices can be created based on request.  This correlates
with the way RAM disks are implemented on VxWorks and is
cleaner and more flexible by making it more independent
of the BSP.
This string should be of OS_FS_DEV_NAME_LEN
This provides a better method of handling test abort,
in a BSP-specific manner.
Remove the OS_VolumeTable definition from all BSPs, but provide
a default (empty) one to support linking when OMIT_DEPRECATED is
not set.
Do not assume BSP volume table provides a "/cf" directory map.
Instead, create a UT-specific map of a consistent name, and use
that.
Add a distinct type for FS_BASED entries, and an UNKNOWN value
for when a type is actually not yet identified.

This can be used to identify the FS type first at the shared
layer, then in the implementation layer as a fallback option
if not identifiable in the shared layer.

Use the volume name prefix "RAM" as a hint that the volume
is supposed to be a VOLATILE disk as opposed to a normal disk.
This is done in shared layer so it applies to all OS types.
Confirm that the "selectable" flag is set before
calling the underlying select() API.

Also update unit tests to match.
If the "OSAL_EXT_SOURCE_DIR" cache variable is set, this location
will be checked first for a BSP/OS implementation layer.  This can
point to an out-of-tree implementation layer if necessary.

However it is discouraged from actually doing this as there is no
attempt at API stability at the low level implementation layer.
Implement OS_GetResourceName, OS_ForEachObjectByType
Corrects issue when a task waiting on a binary semaphore is
deleted, it left the mutex in a locked state preventing other
tasks from using the mutex.
The mutex to protect the timer callback (timecb) resource table
was missing.
Add a wrapper at the shared layer to provide a common location
to check the status of global lock/unlock ops.

All calls to OS_Lock_Global_Impl and OS_Unlock_Global_Impl from
the shared modules are replaced with calls to this wrapper.
… between 0 and <MAX and output array indices vary
Fix #455, correct length of device_name in filesys
Fix #450, add external source directory for OS/BSP
Fix #459, dynamically create RAM disk devices on RTEMS
…sing-Tests

Fix #374, Add Object Utility API functional tests
@astrogeco
Copy link
Contributor Author

astrogeco commented May 26, 2020

@yammajamma one of the unit tests failed after adding your commit for #374. Please fix and commit to this branch with the prefix "HOTFIX" in the commit message.

50/62 Test #50: idmap-api-test ...................***Failed 0.02 sec

…ssing-Functional-API-Tests

Hotfix #374 object utilitys missing functional api tests
jphickey and others added 4 commits May 28, 2020 10:49
Use "object_id" rather than "id" for consistency with other API calls.
The difference was flagged as a warning by doxygen.
- Correct merge issue with regards to the OS_Global_Unlock function
- Correct use of OS_TaskGetId() - need to use Impl variant here.
Fix #367, 453, 456, 460, Deprecate OS_VolumeTable and other fixes
@astrogeco astrogeco marked this pull request as ready for review May 29, 2020 21:32
@astrogeco astrogeco merged commit 3604387 into master May 29, 2020
@skliper skliper added this to the 5.1.0 milestone Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment