2 This file is part of GNUnet.
3 (C) 2011 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.
21 * @file mesh/test_mesh_small.c
23 * @brief Test for the mesh service: retransmission of traffic.
27 #include "mesh_test_lib.h"
28 #include "gnunet_mesh_service.h"
29 #include "gnunet_statistics_service.h"
34 * How namy messages to send
36 #define TOTAL_PACKETS 1000
39 * How long until we give up on connecting the peers?
41 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
44 * Time to wait for stuff that should be rather fast
46 #define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
49 * DIFFERENT TESTS TO RUN
60 * Which test are we running?
65 * String with test name
70 * Flag to send traffic leaf->root in speed tests to test BCK_ACK logic.
72 static int test_backwards = GNUNET_NO;
75 * How many events have happened
80 * Number of events expected to conclude the test successfully.
85 * Size of each test packet
87 size_t size_payload = sizeof (struct GNUNET_MessageHeader) + sizeof (uint32_t);
90 * Operation to get peer ids.
92 struct GNUNET_TESTBED_Operation *t_op[2];
97 struct GNUNET_PeerIdentity *p_id[2];
105 * Is the setup initialized?
107 static int initialized;
110 * Number of payload packes sent
112 static int data_sent;
115 * Number of payload packets received
117 static int data_received;
120 * Number of payload packed explicitly (app level) acknowledged
125 * Total number of currently running peers.
127 static unsigned long long peers_running;
130 * Test context (to shut down).
132 struct GNUNET_MESH_TEST_Context *test_ctx;
135 * Task called to disconnect peers.
137 static GNUNET_SCHEDULER_TaskIdentifier disconnect_task;
140 * Task To perform tests
142 static GNUNET_SCHEDULER_TaskIdentifier test_task;
145 * Task called to shutdown test.
147 static GNUNET_SCHEDULER_TaskIdentifier shutdown_handle;
150 * Mesh handle for the root peer
152 static struct GNUNET_MESH_Handle *h1;
155 * Mesh handle for the first leaf peer
157 static struct GNUNET_MESH_Handle *h2;
160 * Channel handle for the root peer
162 static struct GNUNET_MESH_Channel *ch;
165 * Channel handle for the dest peer
167 static struct GNUNET_MESH_Channel *incoming_ch;
170 * Time we started the data transmission (after channel has been established
173 static struct GNUNET_TIME_Absolute start_time;
175 static struct GNUNET_TESTBED_Peer **testbed_peers;
176 static struct GNUNET_TESTBED_Operation *stats_op;
177 static unsigned int ka_sent;
178 static unsigned int ka_received;
182 * Show the results of the test (banwidth acheived) and log them to GAUGER
187 static struct GNUNET_TIME_Absolute end_time;
188 static struct GNUNET_TIME_Relative total_time;
190 end_time = GNUNET_TIME_absolute_get();
191 total_time = GNUNET_TIME_absolute_get_difference(start_time, end_time);
192 FPRINTF (stderr, "\nResults of test \"%s\"\n", test_name);
193 FPRINTF (stderr, "Test time %s\n",
194 GNUNET_STRINGS_relative_time_to_string (total_time,
196 FPRINTF (stderr, "Test bandwidth: %f kb/s\n",
197 4 * TOTAL_PACKETS * 1.0 / (total_time.rel_value_us / 1000)); // 4bytes * ms
198 FPRINTF (stderr, "Test throughput: %f packets/s\n\n",
199 TOTAL_PACKETS * 1000.0 / (total_time.rel_value_us / 1000)); // packets * ms
200 GAUGER ("MESH", test_name,
201 TOTAL_PACKETS * 1000.0 / (total_time.rel_value_us / 1000),
207 * Shut down peergroup, clean up.
209 * @param cls Closure (unused).
210 * @param tc Task Context.
213 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
215 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending test.\n");
216 shutdown_handle = GNUNET_SCHEDULER_NO_TASK;
221 * Disconnect from mesh services af all peers, call shutdown.
223 * @param cls Closure (unused).
224 * @param tc Task Context.
227 disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
229 long line = (long) cls;
232 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
233 "disconnecting mesh service of peers, called from line %ld\n",
235 disconnect_task = GNUNET_SCHEDULER_NO_TASK;
236 for (i = 0; i < 2; i++)
238 GNUNET_TESTBED_operation_done (t_op[i]);
242 GNUNET_MESH_channel_destroy (ch);
245 if (NULL != incoming_ch)
247 GNUNET_MESH_channel_destroy (incoming_ch);
250 GNUNET_MESH_TEST_cleanup (test_ctx);
251 if (GNUNET_SCHEDULER_NO_TASK != shutdown_handle)
253 GNUNET_SCHEDULER_cancel (shutdown_handle);
255 shutdown_handle = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
260 * Abort test: schedule disconnect and shutdown immediately
262 * @param line Line in the code the abort is requested from (__LINE__).
265 abort_test (long line)
267 if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
269 GNUNET_SCHEDULER_cancel (disconnect_task);
270 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
276 * Transmit ready callback.
278 * @param cls Closure (message type).
279 * @param size Size of the tranmist buffer.
280 * @param buf Pointer to the beginning of the buffer.
282 * @return Number of bytes written to buf.
285 tmt_rdy (void *cls, size_t size, void *buf);
289 * Task to schedule a new data transmission.
291 * @param cls Closure (peer #).
292 * @param tc Task Context.
295 data_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
297 struct GNUNET_MESH_TransmitHandle *th;
298 struct GNUNET_MESH_Channel *channel;
300 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0)
303 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Data task\n");
304 if (GNUNET_YES == test_backwards)
306 channel = incoming_ch;
312 th = GNUNET_MESH_notify_transmit_ready (channel, GNUNET_NO,
313 GNUNET_TIME_UNIT_FOREVER_REL,
314 size_payload, &tmt_rdy, (void *) 1L);
317 unsigned long i = (unsigned long) cls;
319 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Retransmission\n");
322 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " in 1 ms\n");
323 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS,
324 &data_task, (void *)1UL);
329 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "in %u ms\n", i);
330 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(
331 GNUNET_TIME_UNIT_MILLISECONDS,
333 &data_task, (void *)i);
340 * Transmit ready callback
342 * @param cls Closure (message type).
343 * @param size Size of the buffer we have.
344 * @param buf Buffer to copy data to.
347 tmt_rdy (void *cls, size_t size, void *buf)
349 struct GNUNET_MessageHeader *msg = buf;
352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
353 "tmt_rdy called, filling buffer\n");
354 if (size < size_payload || NULL == buf)
356 GNUNET_break (ok >= ok_goal - 2);
357 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
358 "size %u, buf %p, data_sent %u, data_received %u\n",
359 size, buf, data_sent, data_received);
360 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ok %u, ok goal %u\n", ok, ok_goal);
364 msg->size = htons (size);
365 msg->type = htons ((long) cls);
366 data = (uint32_t *) &msg[1];
367 *data = htonl (data_sent);
368 if (GNUNET_NO == initialized)
370 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
371 "sending initializer\n");
373 else if (SPEED == test)
376 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
377 " Sent packet %d\n", data_sent);
378 if (data_sent < TOTAL_PACKETS)
380 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
381 " Scheduling packet %d\n", data_sent + 1);
382 GNUNET_SCHEDULER_add_now (&data_task, NULL);
391 * Function is called whenever a message is received.
393 * @param cls closure (set from GNUNET_MESH_connect)
394 * @param channel connection to the other end
395 * @param channel_ctx place to store local state associated with the channel
396 * @param message the actual message
397 * @return GNUNET_OK to keep the connection open,
398 * GNUNET_SYSERR to close it (signal serious error)
401 data_callback (void *cls, struct GNUNET_MESH_Channel *channel,
403 const struct GNUNET_MessageHeader *message)
405 long client = (long) cls;
406 long expected_target_client;
411 GNUNET_MESH_receive_done (channel);
415 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
417 GNUNET_SCHEDULER_cancel (disconnect_task);
418 disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME,
419 &disconnect_mesh_peers,
427 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Root client got a message!\n");
430 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
431 "Leaf client %li got a message.\n",
438 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " ok: (%d/%d)\n", ok, ok_goal);
439 data = (uint32_t *) &message[1];
440 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " payload: (%u)\n", ntohl (*data));
441 if (SPEED == test && GNUNET_YES == test_backwards)
443 expected_target_client = 0L;
447 expected_target_client = 4L;
450 if (GNUNET_NO == initialized)
452 initialized = GNUNET_YES;
453 start_time = GNUNET_TIME_absolute_get ();
456 GNUNET_assert (4L == client);
457 GNUNET_SCHEDULER_add_now (&data_task, NULL);
462 if (client == expected_target_client) // Normally 4
465 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " received data %u\n", data_received);
466 if (SPEED != test || (ok_goal - 2) == ok)
468 GNUNET_MESH_notify_transmit_ready (channel, GNUNET_NO,
469 GNUNET_TIME_UNIT_FOREVER_REL,
470 size_payload, &tmt_rdy, (void *) 1L);
475 if (data_received < TOTAL_PACKETS)
481 if (test == SPEED_ACK || test == SPEED)
484 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " received ack %u\n", data_ack);
485 GNUNET_MESH_notify_transmit_ready (channel, GNUNET_NO,
486 GNUNET_TIME_UNIT_FOREVER_REL,
487 size_payload, &tmt_rdy, (void *) 1L);
488 if (data_ack < TOTAL_PACKETS && SPEED != test)
490 if (ok == 2 && SPEED == test)
494 if (test == P2P_SIGNAL)
496 GNUNET_MESH_channel_destroy (incoming_ch);
501 GNUNET_MESH_channel_destroy (ch);
506 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
508 GNUNET_SCHEDULER_cancel (disconnect_task);
509 disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME,
510 &disconnect_mesh_peers,
519 * Stats callback. Finish the stats testbed operation and when all stats have
520 * been iterated, shutdown the test.
523 * @param op the operation that has been finished
524 * @param emsg error message in case the operation has failed; will be NULL if
525 * operation has executed successfully.
528 stats_cont (void *cls, struct GNUNET_TESTBED_Operation *op, const char *emsg)
530 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "stats_cont for peer %u\n", cls);
531 GNUNET_TESTBED_operation_done (stats_op);
533 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
534 GNUNET_SCHEDULER_cancel (disconnect_task);
535 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
542 * Process statistic values.
545 * @param peer the peer the statistic belong to
546 * @param subsystem name of subsystem that created the statistic
547 * @param name the name of the datum
548 * @param value the current value
549 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
550 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
553 stats_iterator (void *cls, const struct GNUNET_TESTBED_Peer *peer,
554 const char *subsystem, const char *name,
555 uint64_t value, int is_persistent)
557 static const char *s_sent = "# keepalives sent";
558 static const char *s_recv = "# keepalives received";
561 i = GNUNET_TESTBED_get_index (peer);
562 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " %u - %s [%s]: %llu\n",
563 i, subsystem, name, value);
564 if (0 == strncmp (s_sent, name, strlen (s_sent)) && 0 == i)
567 if (0 == strncmp(s_recv, name, strlen (s_recv)) && 4 == i)
570 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " sent: %u, received: %u\n",
571 ka_sent, ka_received);
572 if (ka_sent < 2 || ka_sent > ka_received + 1)
581 * Task check that keepalives were sent and received.
583 * @param cls Closure (NULL).
584 * @param tc Task Context.
587 check_keepalives (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
589 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0)
592 disconnect_task = GNUNET_SCHEDULER_NO_TASK;
593 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "check keepalives\n");
594 GNUNET_MESH_channel_destroy (ch);
595 stats_op = GNUNET_TESTBED_get_statistics (5, testbed_peers,
597 stats_iterator, stats_cont, NULL);
602 * Handlers, for diverse services
604 static struct GNUNET_MESH_MessageHandler handlers[] = {
605 {&data_callback, 1, sizeof (struct GNUNET_MessageHeader)},
611 * Method called whenever another peer has added us to a channel
612 * the other peer initiated.
614 * @param cls Closure.
615 * @param channel New handle to the channel.
616 * @param initiator Peer that started the channel.
617 * @param port Port this channel is connected to.
618 * @param options channel option flags
619 * @return Initial channel context for the channel
620 * (can be NULL -- that's not an error).
623 incoming_channel (void *cls, struct GNUNET_MESH_Channel *channel,
624 const struct GNUNET_PeerIdentity *initiator,
625 uint32_t port, enum GNUNET_MESH_ChannelOption options)
627 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
628 "Incoming channel from %s to peer %d\n",
629 GNUNET_i2s (initiator), (long) cls);
631 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " ok: %d\n", ok);
632 if ((long) cls == 4L)
633 incoming_ch = channel;
636 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
637 "Incoming channel for unknown client %lu\n", (long) cls);
640 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
642 GNUNET_SCHEDULER_cancel (disconnect_task);
643 if (KEEPALIVE == test)
645 struct GNUNET_TIME_Relative delay;
646 delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS , 5);
648 GNUNET_SCHEDULER_add_delayed (delay, &check_keepalives, NULL);
651 disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME,
652 &disconnect_mesh_peers,
660 * Function called whenever an inbound channel is destroyed. Should clean up
661 * any associated state.
663 * @param cls closure (set from GNUNET_MESH_connect)
664 * @param channel connection to the other end (henceforth invalid)
665 * @param channel_ctx place where local state associated
666 * with the channel is stored
669 channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel,
674 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
675 "Incoming channel disconnected at peer %d\n",
680 GNUNET_break (channel == incoming_ch);
685 if (P2P_SIGNAL == test)
689 GNUNET_break (channel == ch);
693 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
694 "Unknown peer! %d\n", i);
695 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " ok: %d\n", ok);
697 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
699 GNUNET_SCHEDULER_cancel (disconnect_task);
700 disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_mesh_peers,
709 * START THE TESTCASE ITSELF, AS WE ARE CONNECTED TO THE MESH SERVICES.
711 * Testcase continues when the root receives confirmation of connected peers,
712 * on callback funtion ch.
714 * @param cls Closure (unsued).
715 * @param tc Task Context.
718 do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
720 enum GNUNET_MESH_ChannelOption flags;
722 if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0)
725 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test_task\n");
727 if (GNUNET_SCHEDULER_NO_TASK != disconnect_task)
729 GNUNET_SCHEDULER_cancel (disconnect_task);
732 flags = GNUNET_MESH_OPTION_DEFAULT;
733 if (SPEED_REL == test)
736 flags |= GNUNET_MESH_OPTION_RELIABLE;
738 ch = GNUNET_MESH_channel_create (h1, NULL, p_id[1], 1, flags);
740 disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME,
741 &disconnect_mesh_peers,
743 if (KEEPALIVE == test)
744 return; /* Don't send any data. */
746 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
747 "Sending data initializer...\n");
751 GNUNET_MESH_notify_transmit_ready (ch, GNUNET_NO,
752 GNUNET_TIME_UNIT_FOREVER_REL,
753 size_payload, &tmt_rdy, (void *) 1L);
757 * Callback to be called when the requested peer information is available
759 * @param cls the closure from GNUNET_TESTBED_peer_get_information()
760 * @param op the operation this callback corresponds to
761 * @param pinfo the result; will be NULL if the operation has failed
762 * @param emsg error message if the operation has failed;
763 * NULL if the operation is successfull
767 struct GNUNET_TESTBED_Operation *op,
768 const struct GNUNET_TESTBED_PeerInformation *pinfo,
773 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "id callback for %ld\n", i);
775 if (NULL == pinfo || NULL != emsg)
777 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "pi_cb: %s\n", emsg);
778 abort_test (__LINE__);
781 p_id[i] = pinfo->result.id;
782 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " id: %s\n", GNUNET_i2s (p_id[i]));
786 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got all IDs, starting test\n");
787 test_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
792 * test main: start test when all peers are connected
794 * @param cls Closure.
795 * @param ctx Argument to give to GNUNET_MESH_TEST_cleanup on test end.
796 * @param num_peers Number of peers that are running.
797 * @param peers Array of peers.
798 * @param meshes Handle to each of the MESHs of the peers.
802 struct GNUNET_MESH_TEST_Context *ctx,
803 unsigned int num_peers,
804 struct GNUNET_TESTBED_Peer **peers,
805 struct GNUNET_MESH_Handle **meshes)
807 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test main\n");
810 peers_running = num_peers;
811 testbed_peers = peers;
813 h2 = meshes[num_peers - 1];
814 disconnect_task = GNUNET_SCHEDULER_add_delayed (SHORT_TIME,
815 &disconnect_mesh_peers,
817 shutdown_handle = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
818 &shutdown_task, NULL);
819 t_op[0] = GNUNET_TESTBED_peer_get_information (peers[0],
820 GNUNET_TESTBED_PIT_IDENTITY,
821 &pi_cb, (void *) 0L);
822 t_op[1] = GNUNET_TESTBED_peer_get_information (peers[num_peers - 1],
823 GNUNET_TESTBED_PIT_IDENTITY,
824 &pi_cb, (void *) 1L);
825 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "requested peer ids\n");
833 main (int argc, char *argv[])
835 initialized = GNUNET_NO;
836 static uint32_t ports[2];
837 const char *config_file;
839 GNUNET_log_setup ("test", "DEBUG", NULL);
840 config_file = "test_mesh.conf";
842 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start\n");
843 if (strstr (argv[0], "_small_forward") != NULL)
845 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "FORWARD\n");
847 test_name = "unicast";
850 else if (strstr (argv[0], "_small_signal") != NULL)
852 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SIGNAL\n");
854 test_name = "signal";
857 else if (strstr (argv[0], "_small_speed_ack") != NULL)
859 /* Test is supposed to generate the following callbacks:
860 * 1 incoming channel (@dest)
861 * TOTAL_PACKETS received data packet (@dest)
862 * TOTAL_PACKETS received data packet (@orig)
863 * 1 received channel destroy (@dest)
865 ok_goal = TOTAL_PACKETS * 2 + 2;
866 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SPEED_ACK\n");
868 test_name = "speed ack";
870 else if (strstr (argv[0], "_small_speed") != NULL)
872 /* Test is supposed to generate the following callbacks:
873 * 1 incoming channel (@dest)
874 * 1 initial packet (@dest)
875 * TOTAL_PACKETS received data packet (@dest)
876 * 1 received data packet (@orig)
877 * 1 received channel destroy (@dest)
879 ok_goal = TOTAL_PACKETS + 4;
880 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SPEED\n");
881 if (strstr (argv[0], "_reliable") != NULL)
884 test_name = "speed reliable";
885 config_file = "test_mesh_drop.conf";
893 else if (strstr (argv[0], "_keepalive") != NULL)
896 /* Test is supposed to generate the following callbacks:
897 * 1 incoming channel (@dest)
899 * 1 received channel destroy (@dest)
905 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "UNKNOWN\n");
910 if (strstr (argv[0], "backwards") != NULL)
912 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "BACKWARDS (LEAF TO ROOT)\n");
913 test_backwards = GNUNET_YES;
914 GNUNET_asprintf (&test_name, "backwards %s", test_name);
920 GNUNET_MESH_TEST_run ("test_mesh_small",
924 NULL, /* tmain cls */
932 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
933 "FAILED! (%d/%d)\n", ok, ok_goal);
936 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "success\n");
940 /* end of test_mesh_small.c */