Skip to content

Commit

Permalink
Merge pull request #1113 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
osal Integration candidate: 2021-07-20
  • Loading branch information
astrogeco committed Jul 21, 2021
2 parents cb95655 + 1e7fbf4 commit f11d049
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF

## Version History

### Development Build: v5.1.0-rc1+dev573

- Add independent OS_rename functional test parameter checks
- See <https://github.com/nasa/osal/issues/1113> and <https://github.com/nasa/cfs/pull/311>

### Development Build: v5.1.0-rc1+dev569

Expand Down
2 changes: 1 addition & 1 deletion src/os/inc/osapi-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/*
* Development Build Macro Definitions
*/
#define OS_BUILD_NUMBER 569
#define OS_BUILD_NUMBER 573
#define OS_BUILD_BASELINE "v5.1.0-rc1"

/*
Expand Down
11 changes: 7 additions & 4 deletions src/unit-tests/osfile-test/ut_osfile_fileio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,23 +1093,26 @@ void UT_os_renamefile_test()
/*-----------------------------------------------------*/
/* #2 Invalid-path-arg */

UT_RETVAL(OS_rename(g_invalidPath, g_invalidPath), OS_FS_ERR_PATH_INVALID);
UT_RETVAL(OS_rename(g_invalidPath, g_fNames[1]), OS_FS_ERR_PATH_INVALID);
UT_RETVAL(OS_rename(g_fNames[0], g_invalidPath), OS_FS_ERR_PATH_INVALID);

/*-----------------------------------------------------*/
/* #3 Path-too-long-arg */

UT_RETVAL(OS_rename(g_longPathName, g_longPathName), OS_FS_ERR_PATH_TOO_LONG);
UT_RETVAL(OS_rename(g_longPathName, g_fNames[1]), OS_FS_ERR_PATH_TOO_LONG);
UT_RETVAL(OS_rename(g_fNames[0], g_longPathName), OS_FS_ERR_PATH_TOO_LONG);

/*-----------------------------------------------------*/
/* #4 Name-too-long-arg */

UT_RETVAL(OS_rename(g_longFileName, g_longFileName), OS_FS_ERR_NAME_TOO_LONG);
UT_RETVAL(OS_rename(g_longFileName, g_fNames[1]), OS_FS_ERR_NAME_TOO_LONG);
UT_RETVAL(OS_rename(g_fNames[0], g_longFileName), OS_FS_ERR_NAME_TOO_LONG);

/*-----------------------------------------------------*/
/* #6 Nominal */

memset(g_fNames[0], '\0', sizeof(g_fNames[0]));
memset(g_fNames[0], '\0', sizeof(g_fNames[1]));
memset(g_fNames[1], '\0', sizeof(g_fNames[1]));
UT_os_sprintf(g_fNames[0], "%s/Rename_Nom_Old.txt", g_mntName);
UT_os_sprintf(g_fNames[1], "%s/Rename_Nom_New.txt", g_mntName);

Expand Down

0 comments on commit f11d049

Please sign in to comment.