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-08-12 #563

Merged
merged 5 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF

## Version History

### Development Build: 5.1.0-rc1+dev5

- Adds OSAL network APIs missing functional tests as well as tests for OS_TimedRead and OS_TimedWrite
- Allows separate, dynamic registration of test setup and teardown routines which are executed before and after the normal test routine, which can create and delete any global/common test prerequisites.
- Adds FileSysAddFixedMap missing functional API test
- See <https://github.com/nasa/osal/pull/563>


### Development Build: 5.0.0+dev247

- `OS_SocketOpen()` sets `sock_id` and returns a status when successful.
Expand All @@ -19,7 +27,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- The argument names used in stubs match the name in the prototype/documentation so the value can be retrieved by name.
- Adds back rounding up to PTHREAD_STACK_MIN and also adds rounding up to a system page size. Keeps check for zero stack at the shared level; attempts to create a task with zero stack will fail. Allows internal helper threads to be created with a default minimum stack size.
- Avoids a possible truncation in snprintf call. No buffer size/truncation warning when building with optimization enabled.
- Added new macros to `osapi-version` to report baseline and build number
- Added new macros to `osapi-version` to report baseline and build number
- The coverage binaries are now correctly installed for CPU1 and CPU2 as opposed to installed twice to CPU2 but not at all for CPU1.
- Fixes a typo in ut_assert README and clarifies stub documentation.

Expand Down Expand Up @@ -53,7 +61,7 @@ UT assert as a CFE library.

### Development Build: 5.0.19

- Rename BSPs that can be used on multiple platforms.
- Rename BSPs that can be used on multiple platforms.
`mcp750-vxworks` becomes `generic-vxworks`
`pc-linux` becomes `generic-linux`
- New features only, does not change existing behavior.
Expand All @@ -73,15 +81,15 @@ UT Hook functions now have the capability to get argument values by name, which
- Unit tests work on RTEMS without BSP preallocating ramdisks
- If `OSAL_EXT_SOURCE_DIR` cache variable is set, this location will be checked first for a BSP/OS implementation layer.
- 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.
- 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.
- 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.
- Adds the mutex to protect the timer callback `timecb` resource table.
- See <https://github.com/nasa/osal/pull/482>

### Development Build: 5.0.17

- `OS_QueueCreate()` will return an error code if the depth parameter is larger than the configured `OS_MAX_QUEUE_DEPTH`.
- `OS_QueueCreate()` will return an error code if the depth parameter is larger than the configured `OS_MAX_QUEUE_DEPTH`.
- See <https://github.com/nasa/osal/pull/477>

### Development Build: 5.0.16
Expand Down Expand Up @@ -215,4 +223,3 @@ See all open issues and closed to milestones later than this version.
For best results, submit issues:questions or issues:help wanted requests at <https://github.com/nasa/cFS>.

Official cFS page: <http://cfs.gsfc.nasa.gov>

20 changes: 10 additions & 10 deletions src/os/inc/osapi-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
* @brief Purpose:
* @details Provide version identifiers for cFS' Operating System Abstraction Layer
* See @ref cfsversions for version and build number and description
*
*
*/
#ifndef _osapi_version_h_
#define _osapi_version_h_

/*
* Development Build Macro Definitions
* Development Build Macro Definitions
*/
#define OS_BUILD_NUMBER 247
#define OS_BUILD_BASELINE "v5.0.0+dev"
#define OS_BUILD_NUMBER 5
#define OS_BUILD_BASELINE "v5.1.0-rc1+dev"

/*
* Version Macro Definitions
Expand All @@ -43,26 +43,26 @@

/*
* Tools to construct version string
*/
*/
#define OS_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer */
#define OS_STR(x) OS_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer */

/*! @brief Development Build Version Number.
/*! @brief Development Build Version Number.
* @details Baseline git tag + Number of commits since baseline. @n
* See @ref cfsversions for format differences between development and release versions.
*/
#define OS_VERSION OS_BUILD_BASELINE OS_STR(OS_BUILD_NUMBER)
#define OS_VERSION OS_BUILD_BASELINE OS_STR(OS_BUILD_NUMBER)

/*! @brief Development Build Version String.
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest official version. @n
* See @ref cfsversions for format differences between development and release versions.
*/
* See @ref cfsversions for format differences between development and release versions.
*/
#define OS_VERSION_STRING \
" OSAL Development Build\n" \
" " OS_VERSION " (Codename: Bootes)\n" /* Codename for current development */ \
" Latest Official Version: osal v5.0.0" /* For full support please use official release version */

/*! @brief Combines the revision components into a single value
/*! @brief Combines the revision components into a single value
* @details Applications can check against this number @n
* e.g. "#if OSAL_API_VERSION >= 40100" would check if some feature added in
OSAL 4.1 is present.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* NASA Docket No. GSC-18,370-1, and identified as "Operating System Abstraction Layer"
*
* Copyright (c) 2019 United States Government as represented by
* the Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/*
* Filename: file-sys-add-fixed-map-api-test.c
*
* Purpose: This file contains functional tests for "osapi-FileSysAddFixedMap"
*
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "common_types.h"
#include "osapi.h"
#include "utassert.h"
#include "uttest.h"
#include "utbsp.h"


/* *************************************** MAIN ************************************** */

void TestFileSysAddFixedMapApi(void)
{
int32 expected;
int32 actual;
uint32 fs_id;
char translated_path[OS_MAX_LOCAL_PATH_LEN];

/* Test for nominal inputs */

/*
* This test case requires a fixed virtual dir for one test case.
* Just map /test to a dir of the same name, relative to current dir.
*/

expected = OS_FS_ERR_PATH_INVALID;
actual = OS_TranslatePath("/test/myfile.txt", translated_path);
UtAssert_True(actual == expected, "OS_TranslatePath() (%ld) == OS_SUCCESS", (long)actual);

expected = OS_SUCCESS;
actual = OS_FileSysAddFixedMap(&fs_id, "./test", "/test");
UtAssert_True(actual == expected, "OS_FileSysAddFixedMap() (%ld) == OS_SUCCESS", (long)actual);

expected = OS_SUCCESS;
actual = OS_TranslatePath("/test/myfile.txt", translated_path);
UtAssert_True(actual == expected, "OS_TranslatePath() (%ld) == OS_SUCCESS", (long)actual);

/* Test for invalid inputs */
expected = OS_ERR_NAME_TAKEN;
actual = OS_FileSysAddFixedMap(NULL, "./test", "/test");
UtAssert_True(actual == expected, "OS_FileSysAddFixedMap() (%ld) == OS_INVALID_POINTER", (long)actual);

expected = OS_INVALID_POINTER;
actual = OS_FileSysAddFixedMap(&fs_id, NULL, "/test");
UtAssert_True(actual == expected, "OS_FileSysAddFixedMap() (%ld) == OS_INVALID_POINTER", (long)actual);

expected = OS_INVALID_POINTER;
actual = OS_FileSysAddFixedMap(&fs_id, "./test", NULL);
UtAssert_True(actual == expected, "OS_FileSysAddFixedMap() (%ld) == OS_INVALID_POINTER", (long)actual);

expected = OS_INVALID_POINTER;
actual = OS_FileSysAddFixedMap(NULL, NULL, NULL);
UtAssert_True(actual == expected, "OS_FileSysAddFixedMap() (%ld) == OS_INVALID_POINTER", (long)actual);

expected = OS_INVALID_POINTER;
actual = OS_FileSysAddFixedMap(&fs_id, NULL, NULL);
UtAssert_True(actual == expected, "OS_FileSysAddFixedMap() (%ld) == OS_INVALID_POINTER", (long)actual);

expected = OS_INVALID_POINTER;
actual = OS_FileSysAddFixedMap(NULL, "./test", NULL);
UtAssert_True(actual == expected, "OS_FileSysAddFixedMap() (%ld) == OS_INVALID_POINTER", (long)actual);


} /* end TestFileSysAddFixedMapApi */


void UtTest_Setup(void)
{
if (OS_API_Init() != OS_SUCCESS)
{
UtAssert_Abort("OS_API_Init() failed");
}

/*
* Register the test setup and check routines in UT assert
*/
UtTest_Add(TestFileSysAddFixedMapApi, NULL, NULL, "TestFileSysAddFixedMapApi");
}

Loading