You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Incorrect check for events in Unit test code in UT_CheckEventHistoryFromFunc() helper routine. The event storage is an array of event IDs (uint16) but stored in a generic byte buffer. This forgets to divide the Position (which is in bytes) by sizeof(uint16) when reading this, so it ends up checking double the number of entries it is supposed to.
After fixing this issue, it also exposes that some tests in TBL unit tests are also broken.
To Reproduce
Found by inspection.
Expected behavior
Should check the correct number of events.
Describe the bug
Incorrect check for events in Unit test code in
UT_CheckEventHistoryFromFunc()
helper routine. The event storage is an array of event IDs (uint16
) but stored in a generic byte buffer. This forgets to divide thePosition
(which is in bytes) bysizeof(uint16)
when reading this, so it ends up checking double the number of entries it is supposed to.After fixing this issue, it also exposes that some tests in TBL unit tests are also broken.
To Reproduce
Found by inspection.
Expected behavior
Should check the correct number of events.
Code snips
Loop at issue is here:
cFE/fsw/cfe-core/unit-test/ut_support.c
Lines 402 to 411 in 1ede295
System observed on:
Ubuntu 20.04
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: