Skip to content

Fix #2781, fix compilation of time client and coverage tests - #2867

Merged
alanc-gsfc merged 2 commits into
nasa:devfrom
alanc-gsfc:fix-2781-fix-client-compilation
Oct 22, 2026
Merged

alanc-gsfc merged 2 commits into
nasa:devfrom
alanc-gsfc:fix-2781-fix-client-compilation

Conversation

@alanc-gsfc

@alanc-gsfc alanc-gsfc commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

name: FSW Code Change
about: Flight Software code changes
labels: fsw

Description of Change

This fixes the cfe compilation when configured as a time client. The fix also allows the coverage tests to compile and run without failing when the cfe time subsystem is configured as a client.

Note the on the coverage tests, the area where the "#if (CFE_PLATFORM_TIME_CFG_SERVER == true)" clause was removed, the code will initialize that packet for the FAKE tone configuration on both the client and server.

I think there is another bug where clients will send that command to the server. I'm going to verify that it's a problem and submit another issue to fix it. It's likely that this unit test clause will go back once it is fixed. But for now this makes the test match the code.

Linked Issue

Closes #2781

Requirements Impact

  • Requirement ID(s):
  • Requirements updated as necessary
  • Existing requirements are still satisfied by this change

Testing Evidence

the cFS bundle builds and runs when either configured as a time server or time client.
On my cFS fork, I tested this by configuring CPU1 as a server and CPU2 as a client. Both compile and run.

Unit Tests (UT Assert)

Coverage tests pass as before:

Time run from CPU1
[ INFO]                        ABORT::0     WARN::0     FLOW::0     DEBUG::0     N/A::0
[  END] 17 Test_CleanUpApp      TOTAL::6     PASS::6     FAIL::0     MIR::0     TSF::0     TTF::0
[ INFO]                        ABORT::0     WARN::0     FLOW::0     DEBUG::0     N/A::17
[  END] 17 SUMMARY              TOTAL::481   PASS::464   FAIL::0     MIR::0     TSF::0     TTF::0
COMPLETE: 17 tests Segment(s) executed

Time run from CPU2:

[ INFO]                        ABORT::0     WARN::0     FLOW::0     DEBUG::0     N/A::0   
[  END] 17 Test_CleanUpApp      TOTAL::6     PASS::6     FAIL::0     MIR::0     TSF::0     TTF::0   
[ INFO]                        ABORT::0     WARN::0     FLOW::0     DEBUG::0     N/A::20  
[  END] 17 SUMMARY              TOTAL::477   PASS::457   FAIL::0     MIR::0     TSF::0     TTF::0   
COMPLETE: 17 tests Segment(s) executed

COSMOS Test Suite

N/A — no relevant changes

Areas of Expertise Touched

  • ASTRO
  • CI/CD
  • COSMOS
  • Cybersecurity
  • Docker
  • EDS
  • Git
  • PSPs
  • SBN
  • SMP
  • Tables
  • TSN
  • Unit Tests
  • Other - cFE Core

Author Checklist

  • Linked GitHub issue is referenced above
  • Code has been formatted with .clang-format
  • Static analysis workflows ran and passed
  • Unit tests (UT Assert) updated/added to cover code changes
  • Unit test workflows ran and passed
  • COSMOS test suite was run; tests updated/added if relevant changes were made
  • Requirements have been reviewed; updated or confirmed still satisfied (see above)
  • Testing evidence is included above
  • Self-review of the diff completed

Reviewer Checklist

  • Code logic is correct and matches the stated intent
  • Code is readable, maintainable, and follows project conventions (ask your lead if you are unsure of where to find these conventions)
  • .clang-format has been applied
  • Static analysis results reviewed and acceptable
  • The change has been exercised by the unit tests (not just that tests pass — the new/changed code paths are actually covered)
  • COSMOS test suite was executed against this change and results reviewed (or confirmed N/A with justification)
  • Reviewer has independently verified the change behaves as described (e.g., by running the tests locally, reviewing CI output in detail, or performing additional ad-hoc testing as warranted)
  • Memory safety reviewed (allocation, bounds, lifetime, stack usage)
  • Requirements impact reviewed and appropriate
  • Error handling is appropriate
  • Appropriate Expert areas have been reviewed

Reviewer Testing Notes

@alanc-gsfc
alanc-gsfc merged commit b45b347 into nasa:dev Oct 22, 2026
17 checks passed
@alanc-gsfc
alanc-gsfc deleted the fix-2781-fix-client-compilation branch October 30, 2026 16:23
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.

cFE TIME cfe_time_dispatch.c compilation error when configured as a client

2 participants