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 #1780, RTEMS CFE_FT_Global build failure #1781

Merged

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented Aug 9, 2021

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

@astrogeco astrogeco changed the base branch from main to integration-candidate August 9, 2021 20:55
astrogeco added a commit to astrogeco/cFS that referenced this pull request Aug 9, 2021
@astrogeco
Copy link
Contributor Author

@nmullane here's the PR for our fix

@astrogeco astrogeco changed the title Fix #1780, RTEMS build failure Fix #1780, RTEMS CFE_FT_Global build failure Aug 9, 2021
@astrogeco astrogeco changed the title Fix #1780, RTEMS CFE_FT_Global build failure Fix #1780, RTEMS CFE_FT_Global build failure Aug 9, 2021
@skliper
Copy link
Contributor

skliper commented Aug 9, 2021

Minor nit - commit message looks like it's missing a verb. Preference would be "Fix #1780, Resolve RTEMS CFE_FT_Global build failure ..."

Comment on lines +44 to +47
/* 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";
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

@astrogeco astrogeco Aug 9, 2021

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.

Copy link
Contributor

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.

Copy link
Contributor

@nmullane nmullane Aug 10, 2021

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.

Copy link
Contributor Author

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

@astrogeco
Copy link
Contributor Author

Minor nit - commit message looks like it's missing a verb. Preference would be "Fix #1780, Resolve RTEMS 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 ..."

Nit on the nit, wouldn't "Fix" be the verb in this case?

@skliper
Copy link
Contributor

skliper commented Aug 10, 2021

Minor nit - commit message looks like it's missing a verb. Preference would be "Fix #1780, Resolve RTEMS 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 ..."

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:

Fix #1780, Resolve RTEMS CFE_FT_Global build falure

 - Removed multiple instantiations of CFE_FT_Global
 - Moved initialization of CFE_FT_Global table info to main test routine
 - Swapped order of source files in build

@jphickey
Copy link
Contributor

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 #issue is just an additional descriptor in this case, to indicate what issue was fixed (and adhere to our pattern).

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.

Comment on lines +44 to +47
/* 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";
Copy link
Contributor

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.

@skliper
Copy link
Contributor

skliper commented Aug 10, 2021

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 #issue is just an additional descriptor in this case, to indicate what issue was fixed (and adhere to our pattern).

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.

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 <[email protected]>
@astrogeco astrogeco merged commit c16b7ae into nasa:integration-candidate Aug 10, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Aug 10, 2021
- nasa/cFE#1781, RTEMS CFE_FT_Global build failure
- nasa/cFE#1796, replace VOIDCALL assert macro
@astrogeco astrogeco added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Aug 11, 2021
astrogeco added a commit to nasa/cFS that referenced this pull request Aug 11, 2021
**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
astrogeco added a commit to nasa/cFS that referenced this pull request Aug 11, 2021
**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 <[email protected]>
Co-authored-by: Alex Campbell <[email protected]>
Co-authored-by: Niall Mullane <[email protected]>
Co-authored-by: Paul <[email protected]>
@astrogeco astrogeco removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Aug 11, 2021
@astrogeco astrogeco deleted the 1780-RTEMS-build-failure branch August 20, 2021 23:50
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTEMS CFE_FT_Global build failure
5 participants