aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r--src/testing/testing_api_loop.c47
1 files changed, 38 insertions, 9 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 82f6d0cab..49ed48063 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -204,6 +204,8 @@ run_finish_task_next (void *cls)
204 } 204 }
205 else 205 else
206 { 206 {
207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
208 "Next task finished with an error.\n");
207 GNUNET_TESTING_interpreter_fail (); 209 GNUNET_TESTING_interpreter_fail ();
208 } 210 }
209 211
@@ -246,6 +248,8 @@ run_finish_task_sync (void *cls)
246 } 248 }
247 else 249 else
248 { 250 {
251 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
252 "Sync task finished with an error.\n");
249 GNUNET_TESTING_interpreter_fail (); 253 GNUNET_TESTING_interpreter_fail ();
250 } 254 }
251} 255}
@@ -325,16 +329,39 @@ GNUNET_TESTING_interpreter_fail ()
325{ 329{
326 struct GNUNET_TESTING_Command *cmd = &is->commands[is->ip]; 330 struct GNUNET_TESTING_Command *cmd = &is->commands[is->ip];
327 331
328 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 332 if (GNUNET_SYSERR == is->result)
329 "Failed at command `%s'\n", 333 return; /* ignore, we already failed! */
330 cmd->label); 334
331 while (GNUNET_TESTING_cmd_is_batch (cmd)) 335 if (NULL != cmd)
336 {
337 while (GNUNET_TESTING_cmd_is_batch (cmd))
338 {
339 cmd = GNUNET_TESTING_cmd_batch_get_current (cmd);
340 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
341 "Batch is at command `%s'\n",
342 cmd->label);
343 }
344
345 }
346 else
332 { 347 {
333 cmd = GNUNET_TESTING_cmd_batch_get_current (cmd);
334 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 348 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
335 "Batch is at command `%s'\n", 349 "cmd is NULL.\n");
350 }
351
352 if (NULL == cmd->label)
353 {
354 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
355 "Failed at command `%s'\n",
336 cmd->label); 356 cmd->label);
357
337 } 358 }
359 else
360 {
361 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
362 "cmd->label is NULL.\n");
363 }
364
338 is->result = GNUNET_SYSERR; 365 is->result = GNUNET_SYSERR;
339 GNUNET_SCHEDULER_shutdown (); 366 GNUNET_SCHEDULER_shutdown ();
340} 367}
@@ -386,7 +413,8 @@ interpreter_run (void *cls)
386 { 413 {
387 414
388 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 415 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
389 "Running command END\n"); 416 "Running command END %p\n",
417 is);
390 is->result = GNUNET_OK; 418 is->result = GNUNET_OK;
391 GNUNET_SCHEDULER_shutdown (); 419 GNUNET_SCHEDULER_shutdown ();
392 return; 420 return;
@@ -394,8 +422,9 @@ interpreter_run (void *cls)
394 else if (NULL != cmd) 422 else if (NULL != cmd)
395 { 423 {
396 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 424 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
397 "Running command `%s'\n", 425 "Running command `%s' %p\n",
398 cmd->label); 426 cmd->label,
427 is);
399 } 428 }
400 cmd->start_time 429 cmd->start_time
401 = cmd->last_req_time 430 = cmd->last_req_time