Skip to content

Unit test fails when VER_2 headers are used #87

@skliper

Description

@skliper

Describe the bug
Event test strings are different when the MsgId size changes, but test looks for explict message:

CFE_EVS_SendEvent(SAMPLE_INVALID_MSGID_ERR_EID,
CFE_EVS_EventType_ERROR,
"SAMPLE: invalid command packet,MID = 0x%x",
(unsigned int)CFE_SB_MsgIdToValue(MsgId));

UT_CheckEvent_Setup(&EventTest, SAMPLE_INVALID_MSGID_ERR_EID, "SAMPLE: invalid command packet,MID = 0xffff");

UT_CheckEvent_Setup(&EventTest, SAMPLE_LEN_ERR_EID, "Invalid Msg length: ID = 0xFFFF, CC = 0, Len = 18, Expected = 8");

!VER_2 = 0xffff, VER_2 =0xffffffff (or capitalized based on the format string)

To Reproduce
Set MESSAGE_FORMAT_IS_CCSDS_VER_2, build and run unit tests.

Expected behavior
Unit tests should pass with either configuration

Code snips
See above.

System observed on:

  • Hardware: cFS Dev VM
  • OS: Ubuntu 18.04
  • Versions: main bundle

Additional context
None

Reporter Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions