diff options
-rw-r--r-- | src/include/gnunet_testbed_service.h | 5 | ||||
-rw-r--r-- | src/testbed/testbed_api_test.c | 1 | ||||
-rw-r--r-- | src/testbed/testbed_api_testbed.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h index b8e0cf3f7..39b356fa0 100644 --- a/src/include/gnunet_testbed_service.h +++ b/src/include/gnunet_testbed_service.h | |||
@@ -1127,7 +1127,8 @@ GNUNET_TESTBED_destroy (struct GNUNET_TESTBED_Testbed *testbed); | |||
1127 | * @param host_filename name of the file with the 'hosts', NULL | 1127 | * @param host_filename name of the file with the 'hosts', NULL |
1128 | * to run everything on 'localhost' | 1128 | * to run everything on 'localhost' |
1129 | * @param cfg configuration to use (for testbed, controller and peers) | 1129 | * @param cfg configuration to use (for testbed, controller and peers) |
1130 | * @param num_peers number of peers to start; FIXME: maybe put that ALSO into cfg? | 1130 | * @param num_peers number of peers to start; FIXME: maybe put that ALSO into |
1131 | * cfg?; should be greater than 0 | ||
1131 | * @param event_mask bit mask with set of events to call 'cc' for; | 1132 | * @param event_mask bit mask with set of events to call 'cc' for; |
1132 | * or-ed values of "1LL" shifted by the | 1133 | * or-ed values of "1LL" shifted by the |
1133 | * respective 'enum GNUNET_TESTBED_EventType' | 1134 | * respective 'enum GNUNET_TESTBED_EventType' |
@@ -1182,7 +1183,7 @@ typedef void (*GNUNET_TESTBED_TestMaster)(void *cls, | |||
1182 | * @param testname name of the testcase (to configure logging, etc.) | 1183 | * @param testname name of the testcase (to configure logging, etc.) |
1183 | * @param cfg_filename configuration filename to use | 1184 | * @param cfg_filename configuration filename to use |
1184 | * (for testbed, controller and peers) | 1185 | * (for testbed, controller and peers) |
1185 | * @param num_peers number of peers to start | 1186 | * @param num_peers number of peers to start; should be greter than 0 |
1186 | * @param test_master task to run once the test is ready | 1187 | * @param test_master task to run once the test is ready |
1187 | * @param test_master_cls closure for 'task'. | 1188 | * @param test_master_cls closure for 'task'. |
1188 | */ | 1189 | */ |
diff --git a/src/testbed/testbed_api_test.c b/src/testbed/testbed_api_test.c index 1d49e706d..c040e1c79 100644 --- a/src/testbed/testbed_api_test.c +++ b/src/testbed/testbed_api_test.c | |||
@@ -159,6 +159,7 @@ GNUNET_TESTBED_test_run (const char *testname, const char *cfg_filename, | |||
159 | argv2[0] = GNUNET_strdup (testname); | 159 | argv2[0] = GNUNET_strdup (testname); |
160 | argv2[2] = GNUNET_strdup (cfg_filename); | 160 | argv2[2] = GNUNET_strdup (cfg_filename); |
161 | GNUNET_assert (NULL != test_master); | 161 | GNUNET_assert (NULL != test_master); |
162 | GNUNET_assert (num_peers > 0); | ||
162 | rc = GNUNET_malloc (sizeof (struct TestRunContext) + | 163 | rc = GNUNET_malloc (sizeof (struct TestRunContext) + |
163 | (num_peers * sizeof (struct GNUNET_TESTBED_Peer *))); | 164 | (num_peers * sizeof (struct GNUNET_TESTBED_Peer *))); |
164 | rc->test_master = test_master; | 165 | rc->test_master = test_master; |
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 6fa5d6dd4..6e6145aaa 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -483,11 +483,12 @@ GNUNET_TESTBED_run (const char *host_filename, | |||
483 | { | 483 | { |
484 | struct RunContext *rc; | 484 | struct RunContext *rc; |
485 | 485 | ||
486 | rc = GNUNET_malloc (sizeof (struct RunContext)); | ||
487 | GNUNET_break (NULL == host_filename); /* Currently we do not support host | 486 | GNUNET_break (NULL == host_filename); /* Currently we do not support host |
488 | * files */ | 487 | * files */ |
489 | GNUNET_assert (NULL != cc); | 488 | GNUNET_assert (NULL != cc); |
489 | GNUNET_assert (num_peers > 0); | ||
490 | host_filename = NULL; | 490 | host_filename = NULL; |
491 | rc = GNUNET_malloc (sizeof (struct RunContext)); | ||
491 | rc->h = GNUNET_TESTBED_host_create (NULL, NULL, 0); | 492 | rc->h = GNUNET_TESTBED_host_create (NULL, NULL, 0); |
492 | GNUNET_assert (NULL != rc->h); | 493 | GNUNET_assert (NULL != rc->h); |
493 | rc->cproc = | 494 | rc->cproc = |