aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_netjail_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_testing_netjail_lib.h')
-rw-r--r--src/include/gnunet_testing_netjail_lib.h62
1 files changed, 37 insertions, 25 deletions
diff --git a/src/include/gnunet_testing_netjail_lib.h b/src/include/gnunet_testing_netjail_lib.h
index f736e1b42..4f52f5af0 100644
--- a/src/include/gnunet_testing_netjail_lib.h
+++ b/src/include/gnunet_testing_netjail_lib.h
@@ -145,6 +145,16 @@ struct GNUNET_TESTING_NodeConnection
145struct GNUNET_TESTING_NetjailNode 145struct GNUNET_TESTING_NetjailNode
146{ 146{
147 /** 147 /**
148 * Head of the DLL with the connections which shall be established to other nodes.
149 */
150 struct GNUNET_TESTING_NodeConnection *node_connections_head;
151
152 /**
153 * Tail of the DLL with the connections which shall be established to other nodes.
154 */
155 struct GNUNET_TESTING_NodeConnection *node_connections_tail;
156
157 /**
148 * Plugin for the test case to be run on this node. 158 * Plugin for the test case to be run on this node.
149 */ 159 */
150 char *plugin; 160 char *plugin;
@@ -165,19 +175,19 @@ struct GNUNET_TESTING_NetjailNode
165 unsigned int node_n; 175 unsigned int node_n;
166 176
167 /** 177 /**
168 * The number of unintentional additional connections this node waits for. This overwrites the global additional_connects value. 178 * The overall number of the node in the whole test system.
169 */ 179 */
170 unsigned int additional_connects; 180 unsigned int node_number;
171 181
172 /** 182 /**
173 * Head of the DLL with the connections which shall be established to other nodes. 183 * The number of unintentional additional connections this node waits for. This overwrites the global additional_connects value.
174 */ 184 */
175 struct GNUNET_TESTING_NodeConnection *node_connections_head; 185 unsigned int additional_connects;
176 186
177 /** 187 /**
178 * Tail of the DLL with the connections which shall be established to other nodes. 188 * The number of cmds waiting for a specific barrier.
179 */ 189 */
180 struct GNUNET_TESTING_NodeConnection *node_connections_tail; 190 unsigned int expected_reaches;
181}; 191};
182 192
183 193
@@ -275,6 +285,17 @@ GNUNET_TESTING_get_additional_connects (unsigned int num,
275 struct GNUNET_TESTING_NetjailTopology * 285 struct GNUNET_TESTING_NetjailTopology *
276 topology); 286 topology);
277 287
288/**
289 * Get a node from the topology.
290 *
291 * @param num The specific node we want the connections for.
292 * @param topology The topology we get the connections from.
293 * @return The connections of the node.
294 */
295struct GNUNET_TESTING_NetjailNode *
296GNUNET_TESTING_get_node (unsigned int num,
297 struct GNUNET_TESTING_NetjailTopology *topology);
298
278 299
279/** 300/**
280 * Get the connections to other nodes for a specific node. 301 * Get the connections to other nodes for a specific node.
@@ -323,6 +344,16 @@ GNUNET_TESTING_calculate_num (struct
323struct TestState 344struct TestState
324{ 345{
325 /** 346 /**
347 * The head of the DLL with barriers of the test case.
348 */
349 struct GNUNET_TESTING_Barrier *barriers_head;
350
351 /**
352 * The tail of the DLL with barriers of the test case.
353 */
354 struct GNUNET_TESTING_Barrier *barriers_tail;
355
356 /**
326 * Callback to write messages to the master loop. 357 * Callback to write messages to the master loop.
327 * 358 *
328 */ 359 */
@@ -480,25 +511,6 @@ GNUNET_TESTING_send_local_test_finished_msg ();
480 511
481 512
482struct GNUNET_TESTING_Command 513struct GNUNET_TESTING_Command
483GNUNET_TESTING_cmd_barrier_create (
484 const char *label);
485
486
487struct GNUNET_TESTING_Command
488GNUNET_TESTING_cmd_barrier_setup_finished (
489 const char *label);
490
491
492// Wait for barrier to be reached by all;
493// async version implies reached but does not
494// wait on other peers to reach it.
495struct GNUNET_TESTING_Command
496GNUNET_TESTING_cmd_barrier_reached (
497 const char *label,
498 const char *barrier_label);
499
500
501struct GNUNET_TESTING_Command
502GNUNET_TESTING_cmd_block_until_all_peers_started ( 514GNUNET_TESTING_cmd_block_until_all_peers_started (
503 const char *label, 515 const char *label,
504 unsigned int *all_peers_started); 516 unsigned int *all_peers_started);