diff options
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r-- | src/include/gnunet_testing_ng_lib.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h index d218a65db..270fdab26 100644 --- a/src/include/gnunet_testing_ng_lib.h +++ b/src/include/gnunet_testing_ng_lib.h | |||
@@ -328,6 +328,9 @@ GNUNET_TESTING_cmd_end (void); | |||
328 | 328 | ||
329 | /** | 329 | /** |
330 | * Turn asynchronous command into non blocking command by setting asynchronous_finish to true. | 330 | * Turn asynchronous command into non blocking command by setting asynchronous_finish to true. |
331 | * FIXME: what is this API doing? Is it returning a new cmd which is unblocking? | ||
332 | * Is it modifying cmd? | ||
333 | * Looking at the code, it both modifying cmd AND returning a copy oO | ||
331 | * | 334 | * |
332 | * @param cmd command to make synchronous. | 335 | * @param cmd command to make synchronous. |
333 | * @return a finish-command. | 336 | * @return a finish-command. |
@@ -370,6 +373,8 @@ GNUNET_TESTING_cmd_rewind_ip (const char *label, | |||
370 | 373 | ||
371 | /** | 374 | /** |
372 | * Function called with the final result of the test. | 375 | * Function called with the final result of the test. |
376 | * FIXME: This may want to use a GNUNET_ErrorCode (namespaced, e.g. | ||
377 | * GNUNET_EC_TESTING_*) | ||
373 | * | 378 | * |
374 | * @param cls closure | 379 | * @param cls closure |
375 | * @param rv #GNUNET_OK if the test passed | 380 | * @param rv #GNUNET_OK if the test passed |
@@ -385,7 +390,7 @@ typedef void | |||
385 | * defined into the "run" method that returns after | 390 | * defined into the "run" method that returns after |
386 | * having scheduled the test interpreter. | 391 | * having scheduled the test interpreter. |
387 | * | 392 | * |
388 | * @param commands the list of command to execute | 393 | * @param commands the array of command to execute |
389 | * @param timeout how long to wait for each command to execute | 394 | * @param timeout how long to wait for each command to execute |
390 | * @param rc function to call with the final result | 395 | * @param rc function to call with the final result |
391 | * @param rc_cls closure for @a rc | 396 | * @param rc_cls closure for @a rc |
@@ -402,6 +407,7 @@ GNUNET_TESTING_run (const struct GNUNET_TESTING_Command *commands, | |||
402 | * Start a GNUnet scheduler event loop and | 407 | * Start a GNUnet scheduler event loop and |
403 | * run the testsuite. Return 0 upon success. | 408 | * run the testsuite. Return 0 upon success. |
404 | * Expected to be called directly from main(). | 409 | * Expected to be called directly from main(). |
410 | * FIXME: Why is this commands array here not const? | ||
405 | * | 411 | * |
406 | * @param commands the list of command to execute | 412 | * @param commands the list of command to execute |
407 | * @param timeout how long to wait for each command to execute | 413 | * @param timeout how long to wait for each command to execute |
@@ -413,19 +419,6 @@ GNUNET_TESTING_main (struct GNUNET_TESTING_Command *commands, | |||
413 | 419 | ||
414 | 420 | ||
415 | /** | 421 | /** |
416 | * Look for substring in a programs' name. | ||
417 | * | ||
418 | * @param prog program's name to look into | ||
419 | * @param marker chunk to find in @a prog | ||
420 | * // FIXME: this does not belong here! => libgnunetutil, maybe? | ||
421 | * // FIXME: return bool? document return value! | ||
422 | * // FIXME: man strstr?? | ||
423 | */ | ||
424 | int | ||
425 | GNUNET_TESTING_has_in_name (const char *prog, | ||
426 | const char *marker); | ||
427 | |||
428 | /** | ||
429 | * Deleting all barriers create in the context of this interpreter. | 422 | * Deleting all barriers create in the context of this interpreter. |
430 | * | 423 | * |
431 | * @param is The interpreter. | 424 | * @param is The interpreter. |
@@ -473,6 +466,8 @@ GNUNET_TESTING_add_netjail_helper (struct GNUNET_TESTING_Interpreter *is, | |||
473 | 466 | ||
474 | /** | 467 | /** |
475 | * Send Message to netjail nodes that a barrier can be advanced. | 468 | * Send Message to netjail nodes that a barrier can be advanced. |
469 | * FIXME: Naming. No "netjail" in argument. Or is there a | ||
470 | * GNUNET_TESTING_send_message without "to_netjail"?? | ||
476 | * | 471 | * |
477 | * @param is The interpreter. | 472 | * @param is The interpreter. |
478 | * @param global_node_number The node to inform. | 473 | * @param global_node_number The node to inform. |
@@ -486,6 +481,8 @@ GNUNET_TESTING_send_message_to_netjail (struct GNUNET_TESTING_Interpreter *is, | |||
486 | 481 | ||
487 | /** | 482 | /** |
488 | * Returns the actual running command. | 483 | * Returns the actual running command. |
484 | * FIXME: Is Command allocated? Is it constant? Should this be a private | ||
485 | * function? => not used outside of testing | ||
489 | * | 486 | * |
490 | * @param is Global state of the interpreter, used by a command | 487 | * @param is Global state of the interpreter, used by a command |
491 | * to access information about other commands. | 488 | * to access information about other commands. |
@@ -498,6 +495,7 @@ GNUNET_TESTING_interpreter_get_current_command ( | |||
498 | 495 | ||
499 | /** | 496 | /** |
500 | * Check if the command is running. | 497 | * Check if the command is running. |
498 | * FIXME: Unused function. | ||
501 | * | 499 | * |
502 | * @param command The command to check. | 500 | * @param command The command to check. |
503 | * @return GNUNET_NO if the command is not running, GNUNET_YES if it is running. | 501 | * @return GNUNET_NO if the command is not running, GNUNET_YES if it is running. |
@@ -508,6 +506,7 @@ GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command); | |||
508 | 506 | ||
509 | /** | 507 | /** |
510 | * Check if a command is finished. | 508 | * Check if a command is finished. |
509 | * FIXME: Unused function | ||
511 | * | 510 | * |
512 | * @param command The command to check. | 511 | * @param command The command to check. |
513 | * @return GNUNET_NO if the command is not finished, GNUNET_YES if it is finished. | 512 | * @return GNUNET_NO if the command is not finished, GNUNET_YES if it is finished. |
@@ -595,6 +594,7 @@ struct GNUNET_TESTING_Timer | |||
595 | 594 | ||
596 | /** | 595 | /** |
597 | * Retrieve the public key from the test system with the unique node id. | 596 | * Retrieve the public key from the test system with the unique node id. |
597 | * FIXME: Naming. => get_peer? This returns a PeerIdentity not a PublicKey | ||
598 | * | 598 | * |
599 | * @param num The unique node id. | 599 | * @param num The unique node id. |
600 | * @param tl_system The test system. | 600 | * @param tl_system The test system. |
@@ -618,6 +618,7 @@ GNUNET_TESTING_cmd_stat (struct GNUNET_TESTING_Timer *timers); | |||
618 | /* *** Generic trait logic for implementing traits ********* */ | 618 | /* *** Generic trait logic for implementing traits ********* */ |
619 | 619 | ||
620 | /** | 620 | /** |
621 | * FIXME: Documentation | ||
621 | * A trait. | 622 | * A trait. |
622 | */ | 623 | */ |
623 | struct GNUNET_TESTING_Trait | 624 | struct GNUNET_TESTING_Trait |
@@ -652,6 +653,7 @@ GNUNET_TESTING_trait_end (void); | |||
652 | 653 | ||
653 | /** | 654 | /** |
654 | * Extract a trait. | 655 | * Extract a trait. |
656 | * FIXME: Naming. This is something like "contains trait". | ||
655 | * | 657 | * |
656 | * @param traits the array of all the traits. | 658 | * @param traits the array of all the traits. |
657 | * @param[out] ret where to store the result. | 659 | * @param[out] ret where to store the result. |