diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-05-10 13:52:10 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-05-10 13:52:10 +0000 |
commit | 1b1ea13a6cbeabef611bbba982909b88bed400d6 (patch) | |
tree | 02eb46be72accd994124842b4a8b10455c670406 /src/include/gnunet_testing_lib.h | |
parent | 419e0a655bd51e922e4b50d4c17af4f3c04704ec (diff) | |
download | gnunet-1b1ea13a6cbeabef611bbba982909b88bed400d6.tar.gz gnunet-1b1ea13a6cbeabef611bbba982909b88bed400d6.zip |
doxygen and testing api change
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r-- | src/include/gnunet_testing_lib.h | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index 5343e7c5c..51046c49a 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h | |||
@@ -187,6 +187,11 @@ struct GNUNET_TESTING_Daemon | |||
187 | struct GNUNET_CONFIGURATION_Handle *cfg; | 187 | struct GNUNET_CONFIGURATION_Handle *cfg; |
188 | 188 | ||
189 | /** | 189 | /** |
190 | * At what time to give up starting the peer | ||
191 | */ | ||
192 | struct GNUNET_TIME_Absolute max_timeout; | ||
193 | |||
194 | /** | ||
190 | * Host to run GNUnet on. | 195 | * Host to run GNUnet on. |
191 | */ | 196 | */ |
192 | char *hostname; | 197 | char *hostname; |
@@ -266,12 +271,6 @@ struct GNUNET_TESTING_Daemon | |||
266 | pid_t pid; | 271 | pid_t pid; |
267 | 272 | ||
268 | /** | 273 | /** |
269 | * How many iterations have we been waiting for | ||
270 | * the started process to complete? | ||
271 | */ | ||
272 | unsigned int wait_runs; | ||
273 | |||
274 | /** | ||
275 | * In which phase are we during the start of | 274 | * In which phase are we during the start of |
276 | * this process? | 275 | * this process? |
277 | */ | 276 | */ |
@@ -345,6 +344,7 @@ typedef void (*GNUNET_TESTING_NotifyConnection)(void *cls, | |||
345 | * | 344 | * |
346 | * @param sched scheduler to use | 345 | * @param sched scheduler to use |
347 | * @param cfg configuration to use | 346 | * @param cfg configuration to use |
347 | * @param timeout how long to wait starting up peers | ||
348 | * @param hostname name of the machine where to run GNUnet | 348 | * @param hostname name of the machine where to run GNUnet |
349 | * (use NULL for localhost). | 349 | * (use NULL for localhost). |
350 | * @param hostkey_callback function to call once the hostkey has been | 350 | * @param hostkey_callback function to call once the hostkey has been |
@@ -358,6 +358,7 @@ typedef void (*GNUNET_TESTING_NotifyConnection)(void *cls, | |||
358 | struct GNUNET_TESTING_Daemon * | 358 | struct GNUNET_TESTING_Daemon * |
359 | GNUNET_TESTING_daemon_start (struct GNUNET_SCHEDULER_Handle *sched, | 359 | GNUNET_TESTING_daemon_start (struct GNUNET_SCHEDULER_Handle *sched, |
360 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 360 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
361 | struct GNUNET_TIME_Relative timeout, | ||
361 | const char *hostname, | 362 | const char *hostname, |
362 | GNUNET_TESTING_NotifyHostkeyCreated hostkey_callback, | 363 | GNUNET_TESTING_NotifyHostkeyCreated hostkey_callback, |
363 | void *hostkey_cls, | 364 | void *hostkey_cls, |
@@ -399,14 +400,18 @@ GNUNET_TESTING_daemon_get (struct GNUNET_TESTING_PeerGroup *pg, unsigned int pos | |||
399 | * Stops a GNUnet daemon. | 400 | * Stops a GNUnet daemon. |
400 | * | 401 | * |
401 | * @param d the daemon that should be stopped | 402 | * @param d the daemon that should be stopped |
403 | * @param timeout how long to wait for process for shutdown to complete | ||
402 | * @param cb function called once the daemon was stopped | 404 | * @param cb function called once the daemon was stopped |
403 | * @param cb_cls closure for cb | 405 | * @param cb_cls closure for cb |
404 | * @param delete_files GNUNET_YES to remove files, GNUNET_NO | 406 | * @param delete_files GNUNET_YES to remove files, GNUNET_NO |
405 | * to leave them (i.e., for a restart) | 407 | * to leave them (i.e. for restarting at a later time, |
408 | * or logfile inspection once finished) | ||
406 | */ | 409 | */ |
407 | void GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d, | 410 | void |
408 | GNUNET_TESTING_NotifyCompletion cb, | 411 | GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d, |
409 | void * cb_cls, int delete_files); | 412 | struct GNUNET_TIME_Relative timeout, |
413 | GNUNET_TESTING_NotifyCompletion cb, void *cb_cls, | ||
414 | int delete_files); | ||
410 | 415 | ||
411 | 416 | ||
412 | /** | 417 | /** |
@@ -454,6 +459,7 @@ void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, | |||
454 | * @param sched scheduler to use | 459 | * @param sched scheduler to use |
455 | * @param cfg configuration template to use | 460 | * @param cfg configuration template to use |
456 | * @param total number of daemons to start | 461 | * @param total number of daemons to start |
462 | * @param timeout total time allowed for peers to start | ||
457 | * @param hostkey_callback function to call on each peers hostkey generation | 463 | * @param hostkey_callback function to call on each peers hostkey generation |
458 | * if NULL, peers will be started by this call, if non-null, | 464 | * if NULL, peers will be started by this call, if non-null, |
459 | * GNUNET_TESTING_daemons_continue_startup must be called after | 465 | * GNUNET_TESTING_daemons_continue_startup must be called after |
@@ -471,6 +477,7 @@ struct GNUNET_TESTING_PeerGroup * | |||
471 | GNUNET_TESTING_daemons_start (struct GNUNET_SCHEDULER_Handle *sched, | 477 | GNUNET_TESTING_daemons_start (struct GNUNET_SCHEDULER_Handle *sched, |
472 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 478 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
473 | unsigned int total, | 479 | unsigned int total, |
480 | struct GNUNET_TIME_Relative timeout, | ||
474 | GNUNET_TESTING_NotifyHostkeyCreated hostkey_callback, | 481 | GNUNET_TESTING_NotifyHostkeyCreated hostkey_callback, |
475 | void *hostkey_cls, | 482 | void *hostkey_cls, |
476 | GNUNET_TESTING_NotifyDaemonRunning cb, | 483 | GNUNET_TESTING_NotifyDaemonRunning cb, |
@@ -484,7 +491,6 @@ GNUNET_TESTING_daemons_start (struct GNUNET_SCHEDULER_Handle *sched, | |||
484 | * after successfully generating hostkeys for each peer. | 491 | * after successfully generating hostkeys for each peer. |
485 | * | 492 | * |
486 | * @param pg the peer group to continue starting | 493 | * @param pg the peer group to continue starting |
487 | * | ||
488 | */ | 494 | */ |
489 | void | 495 | void |
490 | GNUNET_TESTING_daemons_continue_startup(struct GNUNET_TESTING_PeerGroup *pg); | 496 | GNUNET_TESTING_daemons_continue_startup(struct GNUNET_TESTING_PeerGroup *pg); |
@@ -493,7 +499,6 @@ GNUNET_TESTING_daemons_continue_startup(struct GNUNET_TESTING_PeerGroup *pg); | |||
493 | * Restart all peers in the given group. | 499 | * Restart all peers in the given group. |
494 | * | 500 | * |
495 | * @param pg the handle to the peer group | 501 | * @param pg the handle to the peer group |
496 | * @param timeout how long to wait on failure | ||
497 | * @param callback function to call on completion (or failure) | 502 | * @param callback function to call on completion (or failure) |
498 | * @param callback_cls closure for the callback function | 503 | * @param callback_cls closure for the callback function |
499 | */ | 504 | */ |
@@ -507,9 +512,11 @@ GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg, | |||
507 | * Shutdown all peers started in the given group. | 512 | * Shutdown all peers started in the given group. |
508 | * | 513 | * |
509 | * @param pg handle to the peer group | 514 | * @param pg handle to the peer group |
515 | * @param timeout how long to wait for shutdown | ||
516 | * | ||
510 | */ | 517 | */ |
511 | void | 518 | void |
512 | GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg); | 519 | GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg, struct GNUNET_TIME_Relative timeout); |
513 | 520 | ||
514 | 521 | ||
515 | /** | 522 | /** |