Closed skliper closed 5 years ago
Imported from trac issue 34. Created by sduran on 2015-02-26T14:12:26, last modified: 2019-07-08T14:16:16
Trac comment by rmcclune on 2015-03-16 08:38:54:
cFE branch "trac-34-update-cFE-unit-tests" created. The unit tests are updated to cover cFE version 6.4.1. Also, tests were modified and new tests added to improve the branch path and line coverage.
Trac comment by gdecaruf on 2015-06-04 18:26:03:
Update cFE for Class A & Associated unit tests
Expanding Scope of this ticket beyond unit tests to include cFE source code updates to all cFE files necessary to pursue a Class A safety-critical classification of this software for use by Orion and potentially others. The CFS AES project performed static code analysis utilizing the Understand tool for all MISRA rules, ran static cppcheck tool for potential safety concerns, ran the existing unit tests on a vxworks/LEON3 target with WindRiver Coverage analysis enabled to determine unit test code coverage, and held a general code inspection process. Specific changes as a result will be as follows:
-Updating all cFE files to comply with "most" MISRA rules and cppcheck static analysis errors -Updating all cFE files to remove compiler warnings -Expanding existing unit tests to provide full API-level test coverage based on exposed uncovered code -Adding a full ADDITIONAL unit test suite using UTAssert framework to provide full code and BRANCH level coverage of the cFE source code.
Trac comment by gdecaruf on 2015-06-09 19:25:10:
'''Revisions to the CFE ES Services following Static Code Analysis:'''
commit: [changeset:d81a86c]
commit: [changeset:3a07d9f]
commit: [changeset:ad45ea7]
commit: [changeset:9c98e8f]
commit: [changeset:a759392]
commit: [changeset:a88fc92]
commit: [changeset:22facb6]
commit: [changeset:a37d2be]
Trac comment by gdecaruf on 2015-06-09 21:10:35:
'''Revision of cFE EVS Services following static code analysis:'''
commit: [changeset:e2fddf8]
Trac comment by gdecaruf on 2015-06-11 17:14:09:
'''Revision of cFE FS Services following static code analysis:'''
commit: [changeset:65695e5]
commit: [changeset:2d2d567]
Trac comment by gdecaruf on 2015-06-11 19:08:05:
'''Revision of cFE SB Services following static code analysis:'''
commit: [changeset:aab02be]
commit: [changeset:59640e0]
Trac comment by gdecaruf on 2015-06-11 20:25:49:
'''Revision of cFE TBL Services following static code analysis:'''
commit: [changeset:1247881]
Trac comment by gdecaruf on 2015-06-11 20:54:07:
'''Revision of cFE TIME Services based on static code analysis:'''
commit: [changeset:d81a86c]
commit: [changeset:976ef849]
Trac comment by gdecaruf on 2015-07-02 14:34:19:
'''Revision following code analysis: Change to U / UL for constants'''
commit: [changeset:f50e986e]
commit: [changeset:461d6e38]
commit: [changeset:1c36e160]
commit: [changeset:afb9ed0b]
commit: [changeset:2c23ab81]
commit: [changeset:fee2b856]
Trac comment by jphickey on 2015-07-06 21:47:48:
I have taken a look at some of these changesets and I'm somewhat concerned that this is going far beyond unit test code. Some of the modifications within these changesets directly duplicate other changes that have already been made and already accepted into development (case in point - changing the definitions in {{{cfe_error.h}}}). These are likely to cause conflicts when we try to merge this back in again.
My feeling is that each of these individual commits listed here should be a separate trac ticket. We should be merging this stuff back into development before it diverges too far from the mainline.
Trac comment by sduran on 2015-07-07 14:21:45:
I share the same concern. That was not the original intent of these branches. However, the code to be tested and the unit test code must match and they both live in the same repo. So changes addressing fixes to issues found during unit testing, code reviews, and standards violations have also been made in the same branch. Also, we need stable code to develop the unit tests against. The development branch is a constant moving target now. Once the test development is complete, then whom ever makes changes to the code can keep the unit test up the date too, but the unit tests were not there yet when you all jumped in and stated making changes. It is unfortunate that others are making the same changes. We will have to undergo the pain of merging this in at some point into the development branch after we have the completed the class A cert in a couple of months.
Trac comment by jphickey on 2015-07-07 15:47:39:
My opinion here is that the class A stuff deserves its own development branch.
We already discussed the idea that in addition to "master" and the main "development" branch we could have additional development branches targeting specific audiences. I have already made such a branch for the electronic data sheet version.
Small, to-the-point change sets tend to be easy to merge/move around and as such can be merged to both normal "development" and the class-a development branch (TBD).
I think this approach helps everyone as it gets the useful stuff from all this class A work into the main "development" tree so we all can benefit from it, as well as getting it built and executed more frequently by using the Bamboo system. Not only that, it saves you the effort of re-doing changes that were already done months ago (see [changeset:01adb82]/#53 - committed 02/05/15), and saves us from future merge conflict pain. Seems like a win-win.
Other examples of already-done fixes that address compiler warnings & casting: #51 #54 #55 #57 #58 #64. These were all intentionally done as isolated change sets such that they could be taken by themselves into more conservative branches for those that do not want the rest of the new features.
To further illustrate the problem here: the version this is based upon is still 6.4.1 even though we have 6.4.2 tagged and released that fixes a known serious start up race condition and also fixes a segmentation fault in the unit test. What is the plan to bring this up to 6.4.2?
Trac comment by gdecaruf on 2015-08-11 15:49:36:
Change following code change review:
commit: [changeset:75ada6f8]
Fixed missed case correction for Hex Value. All Hex values have been changed to lower-case for consistency. The type indicator is in Upper case (L, UL, U)
Example: 0xabcdef12UL
Trac comment by gdecaruf on 2015-08-11 16:12:03:
Changes following code change review:
commit: [changeset:0149d12a]
Removed unnecessary type casts for small values and outputs.
Trac comment by gdecaruf on 2015-08-11 17:08:09:
Change following code change review:
commit: [changeset:58be7d34]
Logic correction for filename length. Initial correction planned was to change DirMarkIdx to ssize_t. However ssize_t is POSIX specific and not portable. Instead, a correction factor is added to insure that the original logic is maintained. The original logic had DirMarkIdx initialized to -1, before it's type was corrected in: [changeset:2d2d5671].
Trac comment by glimes on 2016-04-19 22:46:27:
This ticket got "parted out" and we believe that we have dealt with all of the parts. Closing.
Trac comment by jhageman on 2019-03-05 14:57:55:
Milestone renamed
Trac comment by jhageman on 2019-07-08 14:16:16:
Moved work to techdev-JSC-Class-A_and_unit-tests branch and closed trac branch since ticket is closed.
The version of the unit tests currently included with cFE 6.4.1 were developed and tested against cFE 6.3.2. Due to cFE changes, all of the tests no longer pass.
Also, the tests have only been tested with the Linux OSAL/pc-linux PSP and ARINC653 OSAL/OrionSCP PSP.
JSC has updated the tests to work fully with cFE 6.4.1. JSC is also updating the tests to build and run on VxWorks 6.7 (on the SPARC LEON3 processor).
These updates are being tracked in the JSC subversion repo and need to be pushed into a proper git branch and further work continued from there.