aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.h')
-rw-r--r--src/testing/testing.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/testing/testing.h b/src/testing/testing.h
index 7372b143e..debcec39a 100644
--- a/src/testing/testing.h
+++ b/src/testing/testing.h
@@ -265,6 +265,8 @@ GNUNET_TESTING_cmd_batch_set_current_ (const struct GNUNET_TESTING_Command *cmd,
265// wait on other peers to reach it. 265// wait on other peers to reach it.
266/** 266/**
267 * FIXME: Documentation 267 * FIXME: Documentation
268 * FIXME: Now this, as it returns a Command, seems to me like it should be
269 * part of the public API?
268 * Create command. 270 * Create command.
269 * 271 *
270 * @param label name for command. 272 * @param label name for command.
@@ -287,9 +289,13 @@ GNUNET_TESTING_cmd_barrier_reached (
287 289
288 290
289/** 291/**
290 * FIXME: Return type
291 * FIXME: Documentation
292 * Can we advance the barrier? 292 * Can we advance the barrier?
293 * FIXME: As this is not in testing.h it should be in another namespace.
294 * Possibly BARRIER_can_advance. However, as this is also used in a netjail cmd,
295 * I am not sure if this needs to be public? Maybe there should be a barrier
296 * trait that returns a barrier where this helper function can be called on?
297 * Barriers are usually also not "advanced" but "crossed" or "passed"
298 * but it seems to me that the word here should correctly be "reached"?
293 * 299 *
294 * @param barrier The barrier in question. 300 * @param barrier The barrier in question.
295 * @return GNUNET_YES if we can advance the barrier, GNUNET_NO if not. 301 * @return GNUNET_YES if we can advance the barrier, GNUNET_NO if not.
@@ -307,7 +313,7 @@ GNUNET_TESTING_can_barrier_advance (struct GNUNET_TESTING_Barrier *barrier);
307 * @param global_node_number The global number of the node to inform. 313 * @param global_node_number The global number of the node to inform.
308 */ 314 */
309void 315void
310GNUNET_TESTING_send_barrier_advance (struct GNUNET_TESTING_Interpreter *is, 316TST_interpreter_send_barrier_advance (struct GNUNET_TESTING_Interpreter *is,
311 const char *barrier_name, 317 const char *barrier_name,
312 unsigned int global_node_number); 318 unsigned int global_node_number);
313 319
@@ -318,12 +324,13 @@ GNUNET_TESTING_send_barrier_advance (struct GNUNET_TESTING_Interpreter *is,
318 * @param barrier The barrier in question. 324 * @param barrier The barrier in question.
319 */ 325 */
320void 326void
321GNUNET_TESTING_finish_attached_cmds (struct GNUNET_TESTING_Interpreter *is, 327TST_interpreter_finish_attached_cmds (struct GNUNET_TESTING_Interpreter *is,
322 const char *barrier_name); 328 const char *barrier_name);
323 329
324 330
325/** 331/**
326 * Send Message to master loop that cmds being attached to a barrier. 332 * Send Message to master loop that cmds being attached to a barrier.
333 * FIXME: Unused function
327 * 334 *
328 * @param is The interpreter loop. 335 * @param is The interpreter loop.
329 * @param barrier_name The name of the barrier to advance. 336 * @param barrier_name The name of the barrier to advance.
@@ -341,13 +348,17 @@ GNUNET_TESTING_send_barrier_attach (struct GNUNET_TESTING_Interpreter *is,
341 348
342/** 349/**
343 * Getting a node from a map by global node number. 350 * Getting a node from a map by global node number.
351 * FIXME: This is a barrier helper function not related to a command but it is
352 * implemented in the *_cmd_barrier.c file.
353 * Maybe move into a separate file like testing_barrier.c; see also can
354 * barrier advance above
344 * 355 *
345 * @param nodes The map. 356 * @param nodes The map.
346 * @param node_number The global node number. 357 * @param node_number The global node number.
347 * @return The node. 358 * @return The node.
348 */ 359 */
349struct GNUNET_TESTING_NetjailNode * 360struct GNUNET_TESTING_NetjailNode *
350GNUNET_TESTING_barrier_get_node (struct GNUNET_CONTAINER_MultiShortmap *nodes, 361GNUNET_TESTING_barrier_get_node (struct GNUNET_TESTING_Barrier *barrier,
351 unsigned int node_number); 362 unsigned int node_number);
352 363
353 364
@@ -357,7 +368,7 @@ GNUNET_TESTING_barrier_get_node (struct GNUNET_CONTAINER_MultiShortmap *nodes,
357 * @param is The interpreter. 368 * @param is The interpreter.
358 */ 369 */
359void 370void
360GNUNET_TESTING_delete_barriers (struct GNUNET_TESTING_Interpreter *is); 371TST_interpreter_delete_barriers (struct GNUNET_TESTING_Interpreter *is);
361 372
362 373
363/** 374/**
@@ -368,7 +379,7 @@ GNUNET_TESTING_delete_barriers (struct GNUNET_TESTING_Interpreter *is);
368 * @return The barrier. 379 * @return The barrier.
369 */ 380 */
370struct GNUNET_TESTING_Barrier * 381struct GNUNET_TESTING_Barrier *
371GNUNET_TESTING_get_barrier (struct GNUNET_TESTING_Interpreter *is, 382TST_interpreter_get_barrier (struct GNUNET_TESTING_Interpreter *is,
372 const char *barrier_name); 383 const char *barrier_name);
373 384
374 385
@@ -379,7 +390,7 @@ GNUNET_TESTING_get_barrier (struct GNUNET_TESTING_Interpreter *is,
379 * @param barrier The barrier to add. 390 * @param barrier The barrier to add.
380 */ 391 */
381void 392void
382GNUNET_TESTING_interpreter_add_barrier (struct GNUNET_TESTING_Interpreter *is, 393TST_interpreter_add_barrier (struct GNUNET_TESTING_Interpreter *is,
383 struct GNUNET_TESTING_Barrier *barrier); 394 struct GNUNET_TESTING_Barrier *barrier);
384 395
385 396