aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-25 20:59:29 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-25 20:59:29 +0000
commita1aee7611781a9991c31dbaa36d38c95ad5d5300 (patch)
tree76fa1711815f47f559fbdf02fffb9c5792837d26 /src/include/gnunet_testing_lib.h
parent33a7282c26b14f838ad6f1016b90b710cec5f93f (diff)
downloadgnunet-a1aee7611781a9991c31dbaa36d38c95ad5d5300.tar.gz
gnunet-a1aee7611781a9991c31dbaa36d38c95ad5d5300.zip
-comments, doxygen, indentation, style fixes, working on test_gns_vpn
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r--src/include/gnunet_testing_lib.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 4cb518dc3..04975d077 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -226,7 +226,8 @@ GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system,
226 * 226 *
227 * @param system system to use to coordinate resource usage 227 * @param system system to use to coordinate resource usage
228 * @param cfg template configuration to update 228 * @param cfg template configuration to update
229 * @return GNUNET_OK on success, GNUNET_SYSERR on error - the configuration will 229 * @return #GNUNET_OK on success,
230 * #GNUNET_SYSERR on error - the configuration will
230 * be incomplete and should not be used there upon 231 * be incomplete and should not be used there upon
231 */ 232 */
232int 233int
@@ -271,7 +272,8 @@ GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer,
271 * Start the peer. 272 * Start the peer.
272 * 273 *
273 * @param peer peer to start 274 * @param peer peer to start
274 * @return GNUNET_OK on success, GNUNET_SYSERR on error (i.e. peer already running) 275 * @return #GNUNET_OK on success,
276 * #GNUNET_SYSERR on error (i.e. peer already running)
275 */ 277 */
276int 278int
277GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer); 279GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer);
@@ -283,7 +285,8 @@ GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer);
283 * GNUNET_TESTING_peer_stop_async(). 285 * GNUNET_TESTING_peer_stop_async().
284 * 286 *
285 * @param peer peer to stop 287 * @param peer peer to stop
286 * @return GNUNET_OK on success, GNUNET_SYSERR on error (i.e. peer not running) 288 * @return #GNUNET_OK on success,
289 * #GNUNET_SYSERR on error (i.e. peer not running)
287 */ 290 */
288int 291int
289GNUNET_TESTING_peer_stop (struct GNUNET_TESTING_Peer *peer); 292GNUNET_TESTING_peer_stop (struct GNUNET_TESTING_Peer *peer);
@@ -304,7 +307,7 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer);
304 * Sends SIGTERM to the peer's main process 307 * Sends SIGTERM to the peer's main process
305 * 308 *
306 * @param peer the handle to the peer 309 * @param peer the handle to the peer
307 * @return GNUNET_OK if successful; GNUNET_SYSERR if the main process is NULL 310 * @return #GNUNET_OK if successful; #GNUNET_SYSERR if the main process is NULL
308 * or upon any error while sending SIGTERM 311 * or upon any error while sending SIGTERM
309 */ 312 */
310int 313int
@@ -315,7 +318,7 @@ GNUNET_TESTING_peer_kill (struct GNUNET_TESTING_Peer *peer);
315 * Waits for a peer to terminate. The peer's main process will also be destroyed. 318 * Waits for a peer to terminate. The peer's main process will also be destroyed.
316 * 319 *
317 * @param peer the handle to the peer 320 * @param peer the handle to the peer
318 * @return GNUNET_OK if successful; GNUNET_SYSERR if the main process is NULL 321 * @return #GNUNET_OK if successful; #GNUNET_SYSERR if the main process is NULL
319 * or upon any error while waiting 322 * or upon any error while waiting
320 */ 323 */
321int 324int
@@ -327,13 +330,13 @@ GNUNET_TESTING_peer_wait (struct GNUNET_TESTING_Peer *peer);
327 * 330 *
328 * @param cls the closure given to GNUNET_TESTING_peer_stop_async() 331 * @param cls the closure given to GNUNET_TESTING_peer_stop_async()
329 * @param peer the respective peer whose status is being reported 332 * @param peer the respective peer whose status is being reported
330 * @param success GNUNET_YES if the peer is stopped; GNUNET_SYSERR upon any 333 * @param success #GNUNET_YES if the peer is stopped; #GNUNET_SYSERR upon any
331 * error 334 * error
332 */ 335 */
333typedef void (*GNUNET_TESTING_PeerStopCallback) (void *cls, 336typedef void
334 struct GNUNET_TESTING_Peer * 337(*GNUNET_TESTING_PeerStopCallback) (void *cls,
335 peer, 338 struct GNUNET_TESTING_Peer *peer,
336 int success); 339 int success);
337 340
338 341
339/** 342/**
@@ -368,15 +371,16 @@ GNUNET_TESTING_peer_stop_async_cancel (struct GNUNET_TESTING_Peer *peer);
368 371
369/** 372/**
370 * Signature of the 'main' function for a (single-peer) testcase that 373 * Signature of the 'main' function for a (single-peer) testcase that
371 * is run using 'GNUNET_TESTING_peer_run'. 374 * is run using #GNUNET_TESTING_peer_run().
372 * 375 *
373 * @param cls closure 376 * @param cls closure
374 * @param cfg configuration of the peer that was started 377 * @param cfg configuration of the peer that was started
375 * @param peer identity of the peer that was created 378 * @param peer identity of the peer that was created
376 */ 379 */
377typedef void (*GNUNET_TESTING_TestMain) (void *cls, 380typedef void
378 const struct GNUNET_CONFIGURATION_Handle *cfg, 381(*GNUNET_TESTING_TestMain) (void *cls,
379 struct GNUNET_TESTING_Peer *peer); 382 const struct GNUNET_CONFIGURATION_Handle *cfg,
383 struct GNUNET_TESTING_Peer *peer);
380 384
381 385
382/** 386/**
@@ -420,7 +424,7 @@ GNUNET_TESTING_peer_run (const char *testdir,
420 * @param cfgfilename name of the configuration file to use; 424 * @param cfgfilename name of the configuration file to use;
421 * use NULL to only run with defaults 425 * use NULL to only run with defaults
422 * @param tm main function of the testcase 426 * @param tm main function of the testcase
423 * @param tm_cls closure for 'tm' 427 * @param tm_cls closure for @a tm
424 * @return 0 on success, 1 on error 428 * @return 0 on success, 1 on error
425 */ 429 */
426int 430int