* @param host_filename name of the file with the 'hosts', NULL
* to run everything on 'localhost'
* @param cfg configuration to use (for testbed, controller and peers)
- * @param num_peers number of peers to start; FIXME: maybe put that ALSO into cfg?
+ * @param num_peers number of peers to start; FIXME: maybe put that ALSO into
+ * cfg?; should be greater than 0
* @param event_mask bit mask with set of events to call 'cc' for;
* or-ed values of "1LL" shifted by the
* respective 'enum GNUNET_TESTBED_EventType'
* @param testname name of the testcase (to configure logging, etc.)
* @param cfg_filename configuration filename to use
* (for testbed, controller and peers)
- * @param num_peers number of peers to start
+ * @param num_peers number of peers to start; should be greter than 0
* @param test_master task to run once the test is ready
* @param test_master_cls closure for 'task'.
*/
argv2[0] = GNUNET_strdup (testname);
argv2[2] = GNUNET_strdup (cfg_filename);
GNUNET_assert (NULL != test_master);
+ GNUNET_assert (num_peers > 0);
rc = GNUNET_malloc (sizeof (struct TestRunContext) +
(num_peers * sizeof (struct GNUNET_TESTBED_Peer *)));
rc->test_master = test_master;
{
struct RunContext *rc;
- rc = GNUNET_malloc (sizeof (struct RunContext));
GNUNET_break (NULL == host_filename); /* Currently we do not support host
* files */
GNUNET_assert (NULL != cc);
+ GNUNET_assert (num_peers > 0);
host_filename = NULL;
+ rc = GNUNET_malloc (sizeof (struct RunContext));
rc->h = GNUNET_TESTBED_host_create (NULL, NULL, 0);
GNUNET_assert (NULL != rc->h);
rc->cproc =