-
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
Unit tests fail to build when MESSAGE_FORMAT_IS_CCSDS_VER_2 is enabled #618
Comments
It looks like Test_CFE_SB_ChecksumUtils has further issues w/ CCSDSv2, as it assumes SID = MsgID in multiple cases, and doesn't account for the fact that ApidQSystemId is populated w/ the spacecraft ID by CFE_SB_InitMsg (which is a user configurable value, causing ExpRtnFrmGet to be wrong if the spacecraft ID is changed from the defaults). |
I mistakenly filed a duplicate ticket about this because I just discovered it myself. Looks like there are a few issues in here. |
The CFE_SB_GetMsgId/SetMsgId functions, among others, were implemented as replicas of the actual FSW code. This creates a dependency on the actual definition of MsgId used by the mission. This makes the stub and actual stub. Stubs not actually read/write to the message in any way, they just manipulate a local (stored in the UT framework) out-of-band buffer to hold the metadata about the message. This revealed a few other minor issues in test cases where they were depending on values sitting in globals (fixed).
The CFE_SB_GetMsgId/SetMsgId functions, among others, were implemented as replicas of the actual FSW code. This creates a dependency on the actual definition of MsgId used by the mission. This makes the stub and actual stub. Stubs not actually read/write to the message in any way, they just manipulate a local (stored in the UT framework) out-of-band buffer to hold the metadata about the message. This revealed a few other minor issues in test cases where they were depending on values sitting in globals (fixed).
Fix #618, stubs must not depend on real msgid implementation
Describe the bug
Unit tests fail to build when MESSAGE_FORMAT_IS_CCSDS_VER_2 is enabled
To Reproduce
Enable MESSAGE_FORMAT_IS_CCSDS_VER_2 in
*mission_cfg.h
Run
make CFLAGS="-m32 -Wno-format" SIMULATION=native ENABLE_UNIT_TESTS=true
Expected behavior
Compilation succeeds, however build actually fails due to missing
#include
Code snips
This can be fixed by doing the following
However, subsequently a checksum error is encountered when running the tests.
This was worked around by doing the following, but unsure if the workaround is correct.
System observed on:
Reporter Info
John N Pham, Northrop Grumman
The text was updated successfully, but these errors were encountered: