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
Is your feature request related to a problem? Please describe.
FS suffers from the unfortunate pattern of run time checks for endian (and associated logic), which leads to uncovered branches and possibly uncovered code (depending on endian of platform).
/* Determine if this processor is a little endian processor */
if ((*(char*)(&EndianCheck)) ==0x04)
{
/* If this is a little endian processor, then convert the header data structure from */
/* its standard big-endian format into a little endian format to ease user access */
CFE_FS_ByteSwapCFEHeader(Hdr);
}
Describe the solution you'd like
Complete coverage is possible if run on each system, but should be resolved in the future. Possibly in concert with #1209 and related abstraction such that this code doesn't care (whatever underlying API/implementation that handles raw data should do the appropriate conversion).
Describe alternatives you've considered
None
Additional context
None
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered:
"EndianCheck" is hard-coded to 0x01020304. Not possible for a complete code coverage without running on multiple different systems or changing the implementation. Same for CFE_FS_WriteHeade, CFE_FS_ReadHeader, CFE_FS_SetTimestamp. Recommend closing ticket as the branch cannot be reached. @dmknutsen@dzbaker. Same issue in #1900.
@avan989@dmknutsen@dzbaker - these tickets were meant to track the fact we can't get full coverage w/ the current setup. I recommend against closing them unless the lack of coverage is addressed.
Is your feature request related to a problem? Please describe.
FS suffers from the unfortunate pattern of run time checks for endian (and associated logic), which leads to uncovered branches and possibly uncovered code (depending on endian of platform).
Example:
cFE/modules/fs/fsw/src/cfe_fs_api.c
Lines 149 to 155 in 5e41330
Describe the solution you'd like
Complete coverage is possible if run on each system, but should be resolved in the future. Possibly in concert with #1209 and related abstraction such that this code doesn't care (whatever underlying API/implementation that handles raw data should do the appropriate conversion).
Describe alternatives you've considered
None
Additional context
None
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: