@@ -783,7 +783,7 @@ void Test_CFE_TBL_ValidateCmd(void)
783783 ValidateCmd .Payload .ActiveTableFlag = CFE_TBL_BufferSelect_ACTIVE ;
784784 CFE_TBL_Global .Registry [0 ].Buffers [CFE_TBL_Global .Registry [0 ].ActiveBufferIndex ].BufferPtr = BuffPtr ;
785785
786- UT_SetDeferredRetcode (UT_KEY (CFE_ResourceId_FindNext ), 1 , 0 );
786+ UT_SetDeferredRetcode (UT_KEY (CFE_ResourceId_FindNext ), 1 , -1 );
787787 UtAssert_INT32_EQ (CFE_TBL_ValidateCmd (& ValidateCmd ), CFE_TBL_INC_ERR_CTR );
788788
789789 /* Test where the active buffer has data, but there is no validation
@@ -1127,6 +1127,19 @@ void Test_CFE_TBL_DumpCmd(void)
11271127 snprintf (DumpCmd .Payload .TableName , sizeof (DumpCmd .Payload .TableName ), "%d" , CFE_PLATFORM_TBL_MAX_NUM_TABLES + 1 );
11281128 UtAssert_INT32_EQ (CFE_TBL_DumpCmd (& DumpCmd ), CFE_TBL_INC_ERR_CTR );
11291129
1130+ /* Test where the active buffer has data, but no dump control buffer is available
1131+ */
1132+ UT_InitData ();
1133+ strncpy (CFE_TBL_Global .Registry [2 ].Name , "DumpCmdTest" , sizeof (CFE_TBL_Global .Registry [2 ].Name ) - 1 );
1134+ strncpy (DumpCmd .Payload .TableName , CFE_TBL_Global .Registry [2 ].Name , sizeof (DumpCmd .Payload .TableName ) - 1 );
1135+ CFE_TBL_Global .Registry [2 ].DumpOnly = true;
1136+ DumpCmd .Payload .TableName [sizeof (DumpCmd .Payload .TableName ) - 1 ] = '\0' ;
1137+ DumpCmd .Payload .ActiveTableFlag = CFE_TBL_BufferSelect_ACTIVE ;
1138+ CFE_TBL_Global .Registry [2 ].Buffers [CFE_TBL_Global .Registry [2 ].ActiveBufferIndex ].BufferPtr = BuffPtr ;
1139+
1140+ UT_SetDeferredRetcode (UT_KEY (CFE_ResourceId_FindNext ), 1 , -1 );
1141+ UtAssert_INT32_EQ (CFE_TBL_DumpCmd (& DumpCmd ), CFE_TBL_INC_ERR_CTR );
1142+
11301143 /* Test with an active buffer, the pointer is created, validation passes,
11311144 * the table is dump only, no dump is already in progress, and have a
11321145 * working buffer; load in progress, single-buffered
@@ -4068,7 +4081,7 @@ void Test_CFE_TBL_ResourceID_ValidationResult(void)
40684081 UtAssert_BOOL_TRUE (CFE_TBL_CheckValidationResultSlotUsed (PendingId ));
40694082
40704083 /* Test case where no ID is available */
4071- UT_SetDefaultReturnValue (UT_KEY (CFE_ResourceId_FindNext ), 0 );
4084+ UT_SetDefaultReturnValue (UT_KEY (CFE_ResourceId_FindNext ), -1 );
40724085 UtAssert_VOIDCALL (PendingId = CFE_TBL_GetNextValResultBlock ());
40734086 UtAssert_BOOL_FALSE (CFE_ResourceId_IsDefined (PendingId ));
40744087
@@ -4167,7 +4180,7 @@ void Test_CFE_TBL_ResourceID_DumpControl(void)
41674180 UtAssert_BOOL_TRUE (CFE_TBL_CheckDumpCtrlSlotUsed (PendingId ));
41684181
41694182 /* Test case where no ID is available */
4170- UT_SetDefaultReturnValue (UT_KEY (CFE_ResourceId_FindNext ), 0 );
4183+ UT_SetDefaultReturnValue (UT_KEY (CFE_ResourceId_FindNext ), -1 );
41714184 UtAssert_VOIDCALL (PendingId = CFE_TBL_GetNextDumpCtrlBlock ());
41724185 UtAssert_BOOL_FALSE (CFE_ResourceId_IsDefined (PendingId ));
41734186
0 commit comments