2 This file is part of GNUnet
3 (C) 2008--2013 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file testbed/test_testbed_api_barriers.c
23 * @brief testcase binary for testing testbed barriers API
24 * @author Sree Harsha Totakura <sreeharsha@totakura.in>
28 #include "gnunet_util_lib.h"
29 #include "gnunet_testbed_service.h"
32 * Number of peers we start in this test case
37 * Result of this test case
43 * Signature of a main function for a testcase.
46 * @param h the run handle
47 * @param num_peers number of peers in 'peers'
48 * @param peers_ handle to peers run in the testbed
49 * @param links_succeeded the number of overlay link connection attempts that
51 * @param links_failed the number of overlay link connection attempts that
55 test_master (void *cls,
56 struct GNUNET_TESTBED_RunHandle *h,
57 unsigned int num_peers,
58 struct GNUNET_TESTBED_Peer **peers_,
59 unsigned int links_succeeded,
60 unsigned int links_failed)
63 GNUNET_assert (NULL == cls);
66 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failing test due to timeout\n");
69 GNUNET_assert (NUM_PEERS == num_peers);
72 GNUNET_SCHEDULER_shutdown ();
74 /* GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply */
75 /* (GNUNET_TIME_UNIT_SECONDS, 300), */
76 /* do_shutdown, NULL); */
84 main (int argc, char **argv)
88 result = GNUNET_SYSERR;
90 (void) GNUNET_TESTBED_test_run ("test_testbed_api_test",
91 "test_testbed_api_barriers.conf", NUM_PEERS,
92 event_mask, NULL, NULL,
94 if (GNUNET_OK != result)