library for writing DHT tests More...
Go to the source code of this file.
Typedefs | |
typedef void(* | GNUNET_DHT_TEST_AppMain) (void *cls, struct GNUNET_DHT_TEST_Context *ctx, unsigned int num_peers, struct GNUNET_TESTBED_Peer **peers, struct GNUNET_DHT_Handle **dhts) |
Main function of a DHT test. More... | |
Functions | |
void | GNUNET_DHT_TEST_run (const char *testname, const char *cfgname, unsigned int num_peers, GNUNET_DHT_TEST_AppMain tmain, void *tmain_cls) |
Run a test using the given name, configuration file and number of peers. More... | |
void | GNUNET_DHT_TEST_cleanup (struct GNUNET_DHT_TEST_Context *ctx) |
Clean up the testbed. More... | |
library for writing DHT tests
Definition in file dht_test_lib.h.
typedef void(* GNUNET_DHT_TEST_AppMain) (void *cls, struct GNUNET_DHT_TEST_Context *ctx, unsigned int num_peers, struct GNUNET_TESTBED_Peer **peers, struct GNUNET_DHT_Handle **dhts) |
Main function of a DHT test.
cls | closure |
ctx | argument to give to GNUNET_DHT_TEST_cleanup on test end |
num_peers | number of peers that are running |
peers | array of peers |
dhts | handle to each of the DHTs of the peers |
Definition at line 54 of file dht_test_lib.h.
void GNUNET_DHT_TEST_run | ( | const char * | testname, |
const char * | cfgname, | ||
unsigned int | num_peers, | ||
GNUNET_DHT_TEST_AppMain | tmain, | ||
void * | tmain_cls | ||
) |
Run a test using the given name, configuration file and number of peers.
testname | name of the test (for logging) |
cfgname | name of the configuration file |
num_peers | number of peers to start |
tmain | main function to run once the testbed is ready |
tmain_cls | closure for 'tmain' |
Definition at line 178 of file dht_test_lib.c.
References ctx, dht_test_run(), GNUNET_new, GNUNET_new_array, GNUNET_TESTBED_test_run(), num_peers, and tmain().
void GNUNET_DHT_TEST_cleanup | ( | struct GNUNET_DHT_TEST_Context * | ctx | ) |
Clean up the testbed.
ctx | handle for the testbed |
Definition at line 142 of file dht_test_lib.c.
References ctx, GNUNET_free, GNUNET_SCHEDULER_shutdown(), and GNUNET_TESTBED_operation_done().