-
Notifications
You must be signed in to change notification settings - Fork 203
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
Default file name for Task Info is too long #1160
Comments
@dmknutsen - Was this observed in testing at all? |
@skliper - if I remember correctly It would be a problem if someone passed it to CFE_FS_ExtractFilenameFromPath() - which does NOT seem to check the length against any limit ... ironically the stub for this function does enforce its output is less than |
@jphickey had a side conversation w/ Dan and it turns out the default name case was not being checked as part of requirements verification since it doesn't have an explicit requirement. For this situation (functionality derived from design rather than explicit requirement), I'd expect this case to be covered in a functional test (which haven't been implemented yet for cFE). |
Fix #1160, Shorten task info default filename
Describe the bug
The default filename for the task info file is defined here:
cFE/cmake/sample_defs/cpu1_platform_cfg.h
Line 924 in fcaa1d0
The filename portion of the string - "cfe_es_task_info.log" - is exactly 20 chars, and
OSAL_CONFIG_MAX_FILE_NAME
is also 20 chars, so it fails the max length test - because it needs to be less than the max for the NUL char.To Reproduce
Build with default config, issue CFE_ES_QUERY_ALL_TASKS_CC command with no filename - which causes it to use default.
Observe error about failure to create file - error code
OS_FS_ERR_NAME_TOO_LONG
.Expected behavior
Defaults should work.
System observed on:
Ubuntu 20.04
Additional context
The prefix
cfe_es_
is 7 chars by itself. A simple fix would be to trim this back to justcfe_
. Would recommend changing all the default filenames for consistency. ER log is already justcfe_erlog.log
(no es).Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: