-
Notifications
You must be signed in to change notification settings - Fork 202
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 #1780, RTEMS CFE_FT_Global build failure #1781
Fix #1780, RTEMS CFE_FT_Global build failure #1781
Conversation
1f461fe
to
7a8202c
Compare
@nmullane here's the PR for our fix |
CFE_FT_Global
build failure
CFE_FT_Global
build failure
Minor nit - commit message looks like it's missing a verb. Preference would be "Fix #1780, Resolve RTEMS CFE_FT_Global build failure ..." |
/* Constant Table information used by all table tests */ | ||
CFE_FT_Global.TblName = "TestTable"; | ||
CFE_FT_Global.RegisteredTblName = "CFE_TEST_APP.TestTable"; | ||
CFE_FT_Global.TblFilename = "test_tbl.tbl"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is just used by cfe_test_table.c it's probably more appropriate to initialize there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used by multiple functions across multiple source files. The alternative is to re-initialize in each one of them or initialize them in the first one but that introduces a test execution order dependency which feels too brittle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case I'm good as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically
TBLContentAccessTestSetup();
TBLContentMangTestSetup();
TBLInformationTestSetup();
TBLRegistrationTestSetup();
An alternative would be to create a new function say TBLTests_Setup
that only contains this initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually prefer the idea of making a "Setup" function here that does this init, then it can be passed as the setup function as part of the UtTest_Add for any test that uses this table struct. That being said, its OK as is, I wouldn't hold this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think doing it as part of setup function would work out because there is already a setup function which is used by most but not all of the table tests to register a table. Also since CFE_FT_Global is already instantiated in cfe_test.c I think it would make the most sense to also perform the initialization of this data just the once either there or perhaps it could be moved into cfe_test_table.c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened an issue for future work #1797
Nit on the nit, wouldn't "Fix" be the verb in this case? |
Nope. You are "fixing" the #issue, by verbing the subject. To be hones even my suggested update isn't that great... much more helpful to state what you actually did, as in "Fix #1780, Removed multiple instantiations of CFE_FT_Global to resolve RTEMS build issue". Even better:
|
Not intending to start any tribal wars, but I tend to side with @astrogeco on this one - The "Fix" verb should be sufficient. That is, if you simply take out the issue number and said "Fix RTEMS CFE_FT_Global build failure" - that still makes sense. The As space within the first line of an commit log is precious, I don't want to expend space on two verbs that basically mean the same thing ("Fix" and "Resolve"). Keep that for the long description part. In some ways its like saying "ATM Machine" (another pet peeve of mine). That's my 2c at least - I don't really care either way, aside from the general requirement to keep the first line as short as possible (under 50 chars is ideal) so it works well with various tools/displays that use the first line of a commit message. |
/* Constant Table information used by all table tests */ | ||
CFE_FT_Global.TblName = "TestTable"; | ||
CFE_FT_Global.RegisteredTblName = "CFE_TEST_APP.TestTable"; | ||
CFE_FT_Global.TblFilename = "test_tbl.tbl"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually prefer the idea of making a "Setup" function here that does this init, then it can be passed as the setup function as part of the UtTest_Add for any test that uses this table struct. That being said, its OK as is, I wouldn't hold this up.
7a8202c
to
8fca2b1
Compare
What I'm really stuck on is the commit is just restating the issue... I definitely agree saying "Fix #xxx, Fixed issue blah" (or any other synonym of "fix") isn't useful. I agree my initial suggestion doesn't solve that. What I'd much rather see is a summary of the changes. |
- Removed multiple instantiations of CFE_FT_Global - Moves the assignment of the TBL related elements of `CFE_FT_Global` from 'cfe_test_table' to `cfe_test` to avoid duplicate definitions error - Makes `cfe_test.c` first in CMakeLists dependency list Co-authored-by: Niall Mullane <nmullane@users.noreply.github.com>
8fca2b1
to
20fbd6f
Compare
- nasa/cFE#1781, RTEMS CFE_FT_Global build failure - nasa/cFE#1796, replace VOIDCALL assert macro
**Combines** - nasa/cFE#1772, v6.8.0-rc1+dev844 - nasa/osal#1127, v5.1.0-rc1+dev590 **Includes** *cFE* - nasa/cFE#1737, Move global count into test global struct. - nasa/cFE#1722, Add ES application control API functional tests - nasa/cFE#1743, Update coverage test to use UtAssert macros - nasa/cFE#1734, Add table api functional tests - nasa/cFE#1753, Add Generic Counter API test - nasa/cFE#1766, finish ES misc API functional test - nasa/cFE#1764, last char truncated in coverage log output - nasa/cFE#1728, Mistakes in some copyright headers - nasa/cFE#1767, Add misc time api functional test cFE - nasa/cFE#1749, Add Functional Test for EVS Reset Filters API - nasa/cFE#1781, RTEMS CFE_FT_Global build failure - nasa/cFE#1796, replace VOIDCALL assert macro *osal* - nasa/osal#1117, Add absolute branch coverage check
**Combines** - nasa/cFE#1772, v6.8.0-rc1+dev844 - nasa/osal#1127, v5.1.0-rc1+dev590 **Includes** *cFE* - nasa/cFE#1737, Move global count into test global struct. - nasa/cFE#1722, Add ES application control API functional tests - nasa/cFE#1743, Update coverage test to use UtAssert macros - nasa/cFE#1734, Add table api functional tests - nasa/cFE#1753, Add Generic Counter API test - nasa/cFE#1766, finish ES misc API functional test - nasa/cFE#1764, last char truncated in coverage log output - nasa/cFE#1728, Mistakes in some copyright headers - nasa/cFE#1767, Add misc time api functional test cFE - nasa/cFE#1749, Add Functional Test for EVS Reset Filters API - nasa/cFE#1781, RTEMS CFE_FT_Global build failure - nasa/cFE#1796, replace VOIDCALL assert macro *osal* - nasa/osal#1117, Add absolute branch coverage check Co-authored-by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored-by: Alex Campbell <zanzaben@users.noreply.github.com> Co-authored-by: Niall Mullane <nmullane@users.noreply.github.com> Co-authored-by: Paul <pavll@users.noreply.github.com>
Describe the contribution
Testing performed
cFE CI and bundle CI
See succesful bundle tests at https://github.com/astrogeco/cFS/runs/3284780164
Expected behavior changes
No behavior change, fixes build failure on RTEMS 4.11 and 5.0
System(s) tested on
GitHub Actions CI
Additional context
Fixed as part of IC:2021-08-10
Third party code
None
Contributor Info - All information REQUIRED for consideration of pull request
@astrogeco
@nmullane