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

Fix #1650, Add File Utility Functional Tests. #1673

Merged

Conversation

zanzaben
Copy link
Contributor

Describe the contribution
Fixes #1650
Add Functional tests for File Utility Functional Tests.

Testing performed
Build and run unit test

Expected behavior changes
No impact to behavior

System(s) tested on
Ubuntu 20.04

Contributor Info - All information REQUIRED for consideration of pull request
Alex Campbell GSFC

@zanzaben zanzaben added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jul 19, 2021
@zanzaben zanzaben force-pushed the fix1650_FS_File_Util_Func_Tests branch from b13bf28 to 63134bc Compare July 19, 2021 15:58
@skliper skliper added this to the 7.0.0 milestone Jul 20, 2021
@zanzaben zanzaben removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jul 21, 2021
}

/* FT helper stub compatible with background file write DataGetter */
bool FS_DataGetter(void *Meta, uint32 RecordNum, void **Buffer, size_t *BufSize)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When these two functions exists it causes CFE_FS_InitHeader to stall, and then the test timeout detection kicks in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a bug or an issue w/ the test?

@jphickey
Copy link
Contributor

The issue here is that we need to make sure we adhere to the API spec of the function, specifically this one:

** \par Assumptions, External Events, and Notes:
** Metadata structure should be stored in a static memory area (not on heap) as it
** must persist and be accessible by the file writer task throughout the asynchronous
** job operation.

Actually I should probably correct that to say "not on stack" rather than "not on heap". I just added a delay loop to make it pass, but really should make it static or move the object to the global data space.

@zanzaben zanzaben requested a review from jphickey July 23, 2021 15:09
@zanzaben zanzaben added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jul 23, 2021
@astrogeco
Copy link
Contributor

@zanzaben can you add the issue number to @jphickey's commit message? Otherwise, is this ready to merge?

@zanzaben zanzaben force-pushed the fix1650_FS_File_Util_Func_Tests branch from d045f39 to 81c598a Compare July 26, 2021 16:29
@astrogeco astrogeco requested a review from skliper July 26, 2021 19:59
@astrogeco
Copy link
Contributor

@skliper and @jphickey is this good to go?

Copy link
Contributor

@skliper skliper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine by me as long as it's working consistently as expected.

Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions.... Its OK as-is I suppose, but there are few nitpicks I'd recommend improving.

modules/cfe_testcase/src/fs_util_test.c Show resolved Hide resolved
modules/cfe_testcase/src/fs_util_test.c Outdated Show resolved Hide resolved
modules/cfe_testcase/src/fs_util_test.c Outdated Show resolved Hide resolved
@astrogeco astrogeco changed the base branch from main to integration-candidate July 27, 2021 19:03
@astrogeco astrogeco merged commit ea754b6 into nasa:integration-candidate Jul 27, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Jul 27, 2021
nasa/cFE#1673, Add File Utility Functional Tests.

nasa/cFE#1711, Add custom epoch support to TIME UT
astrogeco added a commit to nasa/cFS that referenced this pull request Jul 29, 2021
Combines:

nasa/cFE#1701, v6.8.0-rc1+dev789
nasa/osal#1116, v5.1.0-rc1+dev578
nasa/cFS-GroundSystem#192, v2.2.0-rc1+dev58

Includes:

**cFE**

nasa/cFE#1699, correct return code check
nasa/cFE#1700, documentation for FS APIs that return OSAL codes
nasa/cFE#1695, Adding coverage tests for cfe_es_apps.c
nasa/cFE#1673, Add File Utility Functional Tests.
nasa/cFE#1711, Add custom epoch support to TIME UT
nasa/cFE#1720, Requirements update for Caelum
nasa/cFE#1721, Add null check to CFE_ES_TaskID_ToIndex.
nasa/cFE#1719, scrub command documentation
nasa/cFE#1715, Add time arithmetic functional tests
nasa/cFE#1704, update docs for CFE_FS_BackgroundFileDumpRequest
nasa/cFE#1706, correct return code mismatches

**osal**

nasa/osal#1114, Add unit test branch coverage

**cFS-GroundSystem**

nasa/cFS-GroundSystem#185, Update tlm for ES Blockstats/memstats and TBL HK
nasa/cFS-GroundSystem#188, * might be referenced before assignment

Co-authored-by: Jacob Hageman <skliper@users.noreply.github.com>
Co-authored-by: Joseph Hickey <jphickey@users.noreply.github.com>
Co-authored-by: Alex Campbell <zanzaben@users.noreply.github.com>
Co-authored-by: Jose F Martinez Pedraza <pepepr08@users.noreply.github.com>
Co-authored-by: Niall Mullane <nmullane@users.noreply.github.com>
Co-authored-by: Paul <pavll@users.noreply.github.com>
@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Aug 4, 2021
@astrogeco
Copy link
Contributor

CCB:2021-08-04 APPROVED

@zanzaben zanzaben deleted the fix1650_FS_File_Util_Func_Tests branch August 13, 2021 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add functional tests for cFE FS File Utility APIs
4 participants