-
Notifications
You must be signed in to change notification settings - Fork 204
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
APIs Missing Unit Tests #548
Comments
1. cfe_es_api.c:CFE_ES_DeleteApp - Should test on boundary conditions for AppID In cFE/modules/es/ut-coverage/es_UT.c
2. cfe_es_api.c:CFE_ES_GetAppIDByName - Don’t see where this is ever called in unit test Called in cFE/modules/es/ut-coverage/es_UT.c
3. cfe_es_api.c:CFE_ES_ReloadApp - Should test on boundary conditions for AppID In cFE/modules/es/ut-coverage/es_UT.c
4. cfe_es_api.c:CFE_ES_RestartApp - No success path test
5. cfe_esmempool.c:CFE_ES_GetMemPoolStats - No success path test
6. cfe_sb.h:CFE_SB_MsgId_Equal - Don’t see where this is ever called in unit test
7. cfe_sb.h:CFE_SB_MsgIdToValue - Don’t see where this is ever called in unit test
8. cfe_sb.h:CFE_SB_ValueToMsgId - Don’t see where this is ever called in unit test
9. cfe_sb_api.c:CFE_SB_SubscribeFull - There are 3 cases where CFE_SB_BAD_ARGUMENT can get returned…UT should test each one individually. Also this is outside the scope of the argument validation audit, but there are 3 additional return codes not tested in the unit test.
10. cfe_sb_api.c:CFE_SB_SubscribeLocal - Consider subscribing to message with limit greater than CFE_PLATFORM_SB_DEFAULT_MSG_LIMIT
11. cfe_tbl_api.c:CFE_TBL_DumpToBuffer - No success path test
12. cfe_tbl_api.c:CFE_TBL_GetAddresses - Should test on boundary conditions for NumTables
13. cfe_tbl_api.c:CFE_TBL_GetStatus - Don’t see a success path test
14. cfe_tbl_api.c:CFE_TBL_ReleaseAddresses - No success path test. Also, should test on boundary conditions for NumTables
15. cfe_tbl_api.c:CFE_TBL_Update - Don’t see a success path test
16. cfe_tbl_api.c:CFE_TBL_Validate - No success path test
17. cfe_time_tone.c:CFE_TIME_Local1HzISR - Don’t see where this is ever called in unit test
|
Great work. ID checks against undefined along with a success case are sufficient for testing the "range" so those are good enough. Confirming CFE_TIME_Local1HzISR will get called from the TIME coverage test update issue #473. With this analysis and the remaining missing tests having specific issues, closing as duplicate/OBE. |
Describe the bug
The following APIs need to have additional Unit Tests added:
cfe_es_api.c:CFE_ES_DeleteApp - Should test on boundary conditions for AppID
cfe_es_api.c:CFE_ES_GetAppIDByName - Don’t see where this is ever called in unit test
cfe_es_api.c:CFE_ES_ReloadApp - Should test on boundary conditions for AppID
cfe_es_api.c:CFE_ES_RestartApp - No success path test
cfe_esmempool.c:CFE_ES_GetMemPoolStats - No success path test
cfe_sb.h:CFE_SB_MsgId_Equal - Don’t see where this is ever called in unit test
cfe_sb.h:CFE_SB_MsgIdToValue - Don’t see where this is ever called in unit test
cfe_sb.h:CFE_SB_ValueToMsgId - Don’t see where this is ever called in unit test
cfe_sb_api.c:CFE_SB_SubscribeFull - There are 3 cases where CFE_SB_BAD_ARGUMENT can get returned…UT should test each one individually. Also this is outside the scope of the argument validation audit, but there are 3 additional return codes not tested in the unit test.
cfe_sb_api.c:CFE_SB_SubscribeLocal - Consider subscribing to message with limit greater than CFE_PLATFORM_SB_DEFAULT_MSG_LIMIT
cfe_tbl_api.c:CFE_TBL_DumpToBuffer - No success path test
cfe_tbl_api.c:CFE_TBL_GetAddresses - Should test on boundary conditions for NumTables
cfe_tbl_api.c:CFE_TBL_GetStatus - Don’t see a success path test
cfe_tbl_api.c:CFE_TBL_ReleaseAddresses - No success path test. Also, should test on boundary conditions for NumTables
cfe_tbl_api.c:CFE_TBL_Update - Don’t see a success path test
cfe_tbl_api.c:CFE_TBL_Validate - No success path test
cfe_time_tone.c:CFE_TIME_Local1HzISR - Don’t see where this is ever called in unit test
Expected behavior
Unit Tests test all success/error paths
System observed on:
NA code review/audit
Reporter Info
Dan Knutsen
NASA Goddard
The text was updated successfully, but these errors were encountered: