aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_ng_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-11-29 13:27:28 +0900
committerChristian Grothoff <grothoff@gnunet.org>2023-11-29 13:27:28 +0900
commitc117e2f4e8a5ebd3fb9b7369d0b49161b835ab34 (patch)
treeefd582d2e296c0a1f2d2d52d6f0add5ec9277482 /src/include/gnunet_testing_ng_lib.h
parent3bee1012a99e86855b85e1d6ec6ccb99a1098b37 (diff)
downloadgnunet-c117e2f4e8a5ebd3fb9b7369d0b49161b835ab34.tar.gz
gnunet-c117e2f4e8a5ebd3fb9b7369d0b49161b835ab34.zip
-improve comments
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r--src/include/gnunet_testing_ng_lib.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h
index fc38d77d5..991eddbe4 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2021 GNUnet e.V. 3 Copyright (C) 2021, 2023 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
@@ -89,15 +89,38 @@ struct GNUNET_TESTING_AsyncContext
89}; 89};
90 90
91 91
92/**
93 * Signature of a function used to start executing a command
94 * of a test.
95 *
96 * @param cls closure
97 * @param is interpreter running the command
98 */
92typedef void 99typedef void
93(*GNUNET_TESTING_CommandRunRoutine)(void *cls, 100(*GNUNET_TESTING_CommandRunRoutine)(void *cls,
94 struct GNUNET_TESTING_Interpreter *is); 101 struct GNUNET_TESTING_Interpreter *is);
95 102
96 103
104/**
105 * Signature of a function used to clean up resources allocated
106 * by a command.
107 *
108 * @param cls closure
109 */
97typedef void 110typedef void
98(*GNUNET_TESTING_CommandCleanupRoutine)(void *cls); 111(*GNUNET_TESTING_CommandCleanupRoutine)(void *cls);
99 112
100 113
114/**
115 * Signature of a function used to extract traits exposed by a
116 * command.
117 *
118 * @param cls closure
119 * @param[out] ret where to return the trait data
120 * @param trait name of the trait to return
121 * @param index index of the trait (for traits that are indexed)
122 * @return #GNUNET_OK on success
123 */
101typedef enum GNUNET_GenericReturnValue 124typedef enum GNUNET_GenericReturnValue
102(*GNUNET_TESTING_CommandGetTraits) (void *cls, 125(*GNUNET_TESTING_CommandGetTraits) (void *cls,
103 const void **ret, 126 const void **ret,
@@ -425,7 +448,7 @@ GNUNET_TESTING_main (struct GNUNET_TESTING_Command *commands,
425 * FIXME: Unused function. 448 * FIXME: Unused function.
426 * 449 *
427 * @param command The command to check. 450 * @param command The command to check.
428 * @return GNUNET_NO if the command is not running, GNUNET_YES if it is running. 451 * @return #GNUNET_NO if the command is not running, #GNUNET_YES if it is running.
429 */ 452 */
430enum GNUNET_GenericReturnValue 453enum GNUNET_GenericReturnValue
431GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command); 454GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command);
@@ -436,7 +459,7 @@ GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command);
436 * FIXME: Unused function 459 * FIXME: Unused function
437 * 460 *
438 * @param command The command to check. 461 * @param command The command to check.
439 * @return GNUNET_NO if the command is not finished, GNUNET_YES if it is finished. 462 * @return #GNUNET_NO if the command is not finished, #GNUNET_YES if it is finished.
440 */ 463 */
441enum GNUNET_GenericReturnValue 464enum GNUNET_GenericReturnValue
442GNUNET_TESTING_finished (const struct GNUNET_TESTING_Command *command); 465GNUNET_TESTING_finished (const struct GNUNET_TESTING_Command *command);
@@ -487,7 +510,6 @@ GNUNET_TESTING_cmd_batch (const char *label,
487 510
488/** 511/**
489 * Performance counter. 512 * Performance counter.
490 * // FIXME: this might not belong here!
491 */ 513 */
492struct GNUNET_TESTING_Timer 514struct GNUNET_TESTING_Timer
493{ 515{
@@ -548,7 +570,7 @@ GNUNET_TESTING_get_peer (unsigned int num,
548/** 570/**
549 * Obtain performance data from the interpreter. 571 * Obtain performance data from the interpreter.
550 * 572 *
551 * @param timers what commands (by label) to obtain runtimes for 573 * @param[in,out] timers what commands (by label) to obtain runtimes for
552 * @return the command 574 * @return the command
553 */ 575 */
554struct GNUNET_TESTING_Command 576struct GNUNET_TESTING_Command
@@ -618,7 +640,7 @@ GNUNET_TESTING_get_trait (const struct GNUNET_TESTING_Trait *traits,
618 640
619typedef void * 641typedef void *
620(*GNUNET_TESTING_notify_connect_cb) (struct GNUNET_TESTING_Interpreter *is, 642(*GNUNET_TESTING_notify_connect_cb) (struct GNUNET_TESTING_Interpreter *is,
621 const struct GNUNET_PeerIdentity *peer); 643 const struct GNUNET_PeerIdentity *peer);
622 644
623/** 645/**
624 * Struct to store information needed in callbacks. 646 * Struct to store information needed in callbacks.