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

CFE_Assert should use SendEvent #1266

Closed
zanzaben opened this issue Mar 25, 2021 · 4 comments · Fixed by #1276 or #1295
Closed

CFE_Assert should use SendEvent #1266

zanzaben opened this issue Mar 25, 2021 · 4 comments · Fixed by #1276 or #1295
Assignees
Milestone

Comments

@zanzaben
Copy link
Contributor

Is your feature request related to a problem? Please describe.
CFE_Assert currently has all it's outputs done through CFE_ES_WriteToSysLog which makes them hard to read and failures can get lost in all the noise.

Describe the solution you'd like
CFE_Assert could instead send events through the test runner, which would give a lot more flexibility to the output.

Describe alternatives you've considered
We just leave it as it is.

Additional context
#94 could then be a further enhancement of this done at a later time.

Requester Info
Alex Campbell GSFC

@jphickey
Copy link
Contributor

Also worth noting that the syslog is usually of limited size, so if the test cycle has lots of tests, it is easy for the log to overflow and early messages will get completely lost.

I've evaluated this idea and it is not totally trivial because the events have to be sent by the cfe_testrunner app, not cfe_assert itself (because libraries cannot use event services directly) but that shouldn't be too hard to overcome, a simple notifier callback paradigm should get the job done.

@skliper
Copy link
Contributor

skliper commented Mar 25, 2021

Could "cheat" in this non-flight code context and just use a single ID, either passed in (maybe w/ macro) or initialized.

@jphickey
Copy link
Contributor

I don't see any need to cheat, its easy enough to let cfe_assert call back into test runner.

The other issue to consider is startup order - cfe_assert allows conditions to be asserted during startup phase, and these might occur before event services is even ready to send events. These will always have to go to syslog.

Using a callback also solves the problem by allowing these early asserts to go to syslog but then switching to the events for the bulk/normal tests. Could also send early failures as events in a deferred fashion. Lots of options.

@jphickey jphickey self-assigned this Apr 1, 2021
@jphickey
Copy link
Contributor

jphickey commented Apr 1, 2021

I'll submit something as a proof of concept here

jphickey added a commit to jphickey/cFE that referenced this issue Apr 1, 2021
Reports test failures as CFE events, which allows for more processing
capability, and allows failures to be recieved externally (e.g. ground system).
jphickey added a commit to jphickey/cFE that referenced this issue Apr 1, 2021
Reports test failures as CFE events, which allows for more processing
capability, and allows failures to be recieved externally (e.g. ground system).
jphickey added a commit to jphickey/cFE that referenced this issue Apr 1, 2021
Reports test failures as CFE events, which allows for more processing
capability, and allows failures to be recieved externally (e.g. ground system).
astrogeco added a commit that referenced this issue Apr 12, 2021
@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
Projects
None yet
3 participants