@@ -783,7 +783,7 @@ void Test_CFE_TBL_ValidateCmd(void)
783
783
ValidateCmd .Payload .ActiveTableFlag = CFE_TBL_BufferSelect_ACTIVE ;
784
784
CFE_TBL_Global .Registry [0 ].Buffers [CFE_TBL_Global .Registry [0 ].ActiveBufferIndex ].BufferPtr = BuffPtr ;
785
785
786
- UT_SetDeferredRetcode (UT_KEY (CFE_ResourceId_FindNext ), 1 , 0 );
786
+ UT_SetDeferredRetcode (UT_KEY (CFE_ResourceId_FindNext ), 1 , -1 );
787
787
UtAssert_INT32_EQ (CFE_TBL_ValidateCmd (& ValidateCmd ), CFE_TBL_INC_ERR_CTR );
788
788
789
789
/* Test where the active buffer has data, but there is no validation
@@ -1127,6 +1127,19 @@ void Test_CFE_TBL_DumpCmd(void)
1127
1127
snprintf (DumpCmd .Payload .TableName , sizeof (DumpCmd .Payload .TableName ), "%d" , CFE_PLATFORM_TBL_MAX_NUM_TABLES + 1 );
1128
1128
UtAssert_INT32_EQ (CFE_TBL_DumpCmd (& DumpCmd ), CFE_TBL_INC_ERR_CTR );
1129
1129
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
+
1130
1143
/* Test with an active buffer, the pointer is created, validation passes,
1131
1144
* the table is dump only, no dump is already in progress, and have a
1132
1145
* working buffer; load in progress, single-buffered
@@ -4068,7 +4081,7 @@ void Test_CFE_TBL_ResourceID_ValidationResult(void)
4068
4081
UtAssert_BOOL_TRUE (CFE_TBL_CheckValidationResultSlotUsed (PendingId ));
4069
4082
4070
4083
/* 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 );
4072
4085
UtAssert_VOIDCALL (PendingId = CFE_TBL_GetNextValResultBlock ());
4073
4086
UtAssert_BOOL_FALSE (CFE_ResourceId_IsDefined (PendingId ));
4074
4087
@@ -4167,7 +4180,7 @@ void Test_CFE_TBL_ResourceID_DumpControl(void)
4167
4180
UtAssert_BOOL_TRUE (CFE_TBL_CheckDumpCtrlSlotUsed (PendingId ));
4168
4181
4169
4182
/* 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 );
4171
4184
UtAssert_VOIDCALL (PendingId = CFE_TBL_GetNextDumpCtrlBlock ());
4172
4185
UtAssert_BOOL_FALSE (CFE_ResourceId_IsDefined (PendingId ));
4173
4186
0 commit comments