2 This file is part of GNUnet.
3 (C) 2009 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 2, 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 testing/test_testing_topology.c
22 * @brief base testcase for testing all the topologies provided
25 #include "gnunet_testing_lib.h"
26 #include "gnunet_core_service.h"
28 #define VERBOSE GNUNET_YES
31 * How long until we fail the whole testcase?
33 #define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 600)
36 * How long until we give up on starting the peers?
38 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 500)
40 #define DEFAULT_NUM_PEERS 4
42 #define MAX_OUTSTANDING_CONNECTIONS 300
44 static float fail_percentage = 0.05;
48 static unsigned long long num_peers;
50 static unsigned int total_connections;
52 static unsigned int failed_connections;
54 static unsigned int total_server_connections;
56 static unsigned int total_messages_received;
58 static unsigned int expected_messages;
60 static unsigned int expected_connections;
62 static unsigned long long peers_left;
64 static struct GNUNET_TESTING_PeerGroup *pg;
66 static struct GNUNET_SCHEDULER_Handle *sched;
68 const struct GNUNET_CONFIGURATION_Handle *main_cfg;
70 GNUNET_SCHEDULER_TaskIdentifier die_task;
72 static char *dotOutFileName;
74 static FILE *dotOutFile;
76 static char *topology_string;
78 static char *blacklist_transports;
80 static int transmit_ready_scheduled;
82 static int transmit_ready_failed;
84 static int transmit_ready_called;
86 static enum GNUNET_TESTING_Topology topology;
88 static enum GNUNET_TESTING_Topology blacklist_topology = GNUNET_TESTING_TOPOLOGY_NONE; /* Don't do any blacklisting */
90 static enum GNUNET_TESTING_Topology connection_topology = GNUNET_TESTING_TOPOLOGY_NONE; /* NONE actually means connect all allowed peers */
92 static enum GNUNET_TESTING_TopologyOption connect_topology_option = GNUNET_TESTING_TOPOLOGY_OPTION_ALL;
94 static double connect_topology_option_modifier = 0.0;
96 static char *test_directory;
100 struct GNUNET_TestMessage
103 * Header of the message
105 struct GNUNET_MessageHeader header;
108 * Unique identifier for this message.
113 struct TestMessageContext
115 /* This is a linked list */
116 struct TestMessageContext *next;
118 /* Handle to the sending peer core */
119 struct GNUNET_CORE_Handle *peer1handle;
121 /* Handle to the receiving peer core */
122 struct GNUNET_CORE_Handle *peer2handle;
124 /* Handle to the sending peer daemon */
125 struct GNUNET_TESTING_Daemon *peer1;
127 /* Handle to the receiving peer daemon */
128 struct GNUNET_TESTING_Daemon *peer2;
130 /* Identifier for this message, so we don't disconnect other peers! */
133 /* Task for disconnecting cores, allow task to be cancelled on shutdown */
134 GNUNET_SCHEDULER_TaskIdentifier disconnect_task;
138 static struct TestMessageContext *test_messages;
143 GNUNET_assert (pg != NULL);
144 struct TestMessageContext *pos;
145 struct TestMessageContext *free_pos;
147 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
148 "Called finish testing, stopping daemons.\n");
155 if (pos->peer1handle != NULL)
157 GNUNET_CORE_disconnect(pos->peer1handle);
158 pos->peer1handle = NULL;
160 if (pos->peer2handle != NULL)
162 GNUNET_CORE_disconnect(pos->peer2handle);
163 pos->peer2handle = NULL;
167 if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK)
169 GNUNET_SCHEDULER_cancel(sched, free_pos->disconnect_task);
171 GNUNET_free(free_pos);
174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
175 "transmit_ready's scheduled %d, failed %d, transmit_ready's called %d\n", transmit_ready_scheduled, transmit_ready_failed, transmit_ready_called);
179 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
180 "Calling daemons_stop\n");
182 GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
184 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
185 "daemons_stop finished\n");
187 if (dotOutFile != NULL)
189 fprintf(dotOutFile, "}");
198 disconnect_cores (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
200 struct TestMessageContext *pos = cls;
202 /* Disconnect from the respective cores */
204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
205 "Disconnecting from peer 1 `%4s'\n", GNUNET_i2s (&pos->peer1->id));
207 if (pos->peer1handle != NULL)
208 GNUNET_CORE_disconnect(pos->peer1handle);
210 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
211 "Disconnecting from peer 2 `%4s'\n", GNUNET_i2s (&pos->peer2->id));
213 if (pos->peer2handle != NULL)
214 GNUNET_CORE_disconnect(pos->peer2handle);
215 /* Set handles to NULL so test case can be ended properly */
216 pos->peer1handle = NULL;
217 pos->peer2handle = NULL;
218 pos->disconnect_task = GNUNET_SCHEDULER_NO_TASK;
219 /* Decrement total connections so new can be established */
220 total_server_connections -= 2;
224 process_mtype (void *cls,
225 const struct GNUNET_PeerIdentity *peer,
226 const struct GNUNET_MessageHeader *message,
227 struct GNUNET_TIME_Relative latency,
230 struct TestMessageContext *pos = cls;
231 struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *)message;
232 if (pos->uid != ntohl(msg->uid))
235 total_messages_received++;
237 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
238 "Received message from `%4s', type %d.\n", GNUNET_i2s (peer), ntohs(message->type));
239 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
240 "Total messages received %d, expected %d.\n", total_messages_received, expected_messages);
243 if (total_messages_received == expected_messages)
245 GNUNET_SCHEDULER_cancel (sched, die_task);
246 GNUNET_SCHEDULER_add_now (sched, &finish_testing, NULL);
250 pos->disconnect_task = GNUNET_SCHEDULER_add_now(sched, &disconnect_cores, pos);
257 end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
260 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
261 "End badly was called (%s)... stopping daemons.\n", msg);
262 struct TestMessageContext *pos;
263 struct TestMessageContext *free_pos;
268 if (pos->peer1handle != NULL)
270 GNUNET_CORE_disconnect(pos->peer1handle);
271 pos->peer1handle = NULL;
273 if (pos->peer2handle != NULL)
275 GNUNET_CORE_disconnect(pos->peer2handle);
276 pos->peer2handle = NULL;
280 GNUNET_free(free_pos);
285 GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
286 ok = 7331; /* Opposite of leet */
289 ok = 401; /* Never got peers started */
291 if (dotOutFile != NULL)
293 fprintf(dotOutFile, "}");
301 transmit_ready (void *cls, size_t size, void *buf)
303 struct GNUNET_TestMessage *m;
304 struct TestMessageContext *pos = cls;
306 GNUNET_assert (buf != NULL);
307 m = (struct GNUNET_TestMessage *) buf;
308 m->header.type = htons (MTYPE);
309 m->header.size = htons (sizeof (struct GNUNET_TestMessage));
310 m->uid = htonl(pos->uid);
311 transmit_ready_called++;
313 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
314 "transmit ready for peer %s\ntransmit_ready's scheduled %d, transmit_ready's called %d\n", GNUNET_i2s(&pos->peer1->id), transmit_ready_scheduled, transmit_ready_called);
316 return sizeof (struct GNUNET_TestMessage);
320 static struct GNUNET_CORE_MessageHandler no_handlers[] = {
324 static struct GNUNET_CORE_MessageHandler handlers[] = {
325 {&process_mtype, MTYPE, sizeof (struct GNUNET_TestMessage)},
330 init_notify_peer2 (void *cls,
331 struct GNUNET_CORE_Handle *server,
332 const struct GNUNET_PeerIdentity *my_identity,
333 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
335 struct TestMessageContext *pos = cls;
338 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
339 "Core connection to `%4s' established, scheduling message send\n",
340 GNUNET_i2s (my_identity));
342 total_server_connections++;
344 if (NULL == GNUNET_CORE_notify_transmit_ready (pos->peer1handle,
348 sizeof (struct GNUNET_TestMessage),
349 &transmit_ready, pos))
351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
352 "RECEIVED NULL when asking core (1) for transmission to peer `%4s'\n",
353 GNUNET_i2s (&pos->peer2->id));
354 transmit_ready_failed++;
358 transmit_ready_scheduled++;
364 init_notify_peer1 (void *cls,
365 struct GNUNET_CORE_Handle *server,
366 const struct GNUNET_PeerIdentity *my_identity,
367 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
369 struct TestMessageContext *pos = cls;
370 total_server_connections++;
373 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
374 "Core connection to `%4s' established, setting up handles\n",
375 GNUNET_i2s (my_identity));
379 * Connect to the receiving peer
381 pos->peer2handle = GNUNET_CORE_connect (sched,
389 GNUNET_YES, NULL, GNUNET_YES, handlers);
395 send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
397 struct TestMessageContext *pos = cls;
399 if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) || (cls == NULL))
402 if (die_task == GNUNET_SCHEDULER_NO_TASK)
404 die_task = GNUNET_SCHEDULER_add_delayed (sched,
406 &end_badly, "from create topology (timeout)");
409 if (total_server_connections >= MAX_OUTSTANDING_CONNECTIONS)
411 GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1),
412 &send_test_messages, pos);
413 return; /* Otherwise we'll double schedule messages here! */
417 * Connect to the sending peer
419 pos->peer1handle = GNUNET_CORE_connect (sched,
427 GNUNET_NO, NULL, GNUNET_NO, no_handlers);
429 GNUNET_assert(pos->peer1handle != NULL);
431 if (total_server_connections < MAX_OUTSTANDING_CONNECTIONS)
433 GNUNET_SCHEDULER_add_now (sched,
434 &send_test_messages, pos->next);
438 GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1),
439 &send_test_messages, pos->next);
445 topology_callback (void *cls,
446 const struct GNUNET_PeerIdentity *first,
447 const struct GNUNET_PeerIdentity *second,
449 const struct GNUNET_CONFIGURATION_Handle *first_cfg,
450 const struct GNUNET_CONFIGURATION_Handle *second_cfg,
451 struct GNUNET_TESTING_Daemon *first_daemon,
452 struct GNUNET_TESTING_Daemon *second_daemon,
455 struct TestMessageContext *temp_context;
460 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "connected peer %s to peer %s\n",
461 first_daemon->shortname,
462 second_daemon->shortname);
464 temp_context = GNUNET_malloc(sizeof(struct TestMessageContext));
465 temp_context->peer1 = first_daemon;
466 temp_context->peer2 = second_daemon;
467 temp_context->next = test_messages;
468 temp_context->uid = total_connections;
469 temp_context->disconnect_task = GNUNET_SCHEDULER_NO_TASK;
470 test_messages = temp_context;
473 if (dotOutFile != NULL)
474 fprintf(dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, second_daemon->shortname);
479 failed_connections++;
480 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to connect peer %s to peer %s with error :\n%s\n",
481 first_daemon->shortname,
482 second_daemon->shortname, emsg);
486 if (total_connections == expected_connections)
489 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
490 "Created %d total connections, which is our target number! Calling send messages.\n",
494 GNUNET_SCHEDULER_cancel (sched, die_task);
495 die_task = GNUNET_SCHEDULER_NO_TASK;
496 GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages);
497 //GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 1), &send_test_messages, test_messages);
499 else if (total_connections + failed_connections == expected_connections)
501 if (failed_connections < (unsigned int)(fail_percentage * total_connections))
503 GNUNET_SCHEDULER_cancel (sched, die_task);
504 die_task = GNUNET_SCHEDULER_NO_TASK;
505 GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages);
506 //GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 1), &send_test_messages, test_messages);
510 GNUNET_SCHEDULER_cancel (sched, die_task);
511 die_task = GNUNET_SCHEDULER_add_now (sched,
512 &end_badly, "from topology_callback (too many failed connections)");
518 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
519 "Have %d total connections, %d failed connections, Want %d (at least %d)\n",
520 total_connections, failed_connections, expected_connections, expected_connections - (unsigned int)(fail_percentage * expected_connections));
528 expected_connections = -1;
529 if ((pg != NULL) && (peers_left == 0))
531 expected_connections = GNUNET_TESTING_connect_topology (pg, connection_topology, connect_topology_option, connect_topology_option_modifier);
533 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
534 "Have %d expected connections\n", expected_connections);
538 GNUNET_SCHEDULER_cancel (sched, die_task);
539 if (expected_connections == GNUNET_SYSERR)
541 die_task = GNUNET_SCHEDULER_add_now (sched,
542 &end_badly, "from connect topology (bad return)");
545 die_task = GNUNET_SCHEDULER_add_delayed (sched,
547 &end_badly, "from connect topology (timeout)");
553 peers_left = num_peers; /* Reset counter */
554 if (GNUNET_TESTING_create_topology (pg, topology, blacklist_topology, blacklist_transports) != GNUNET_SYSERR)
557 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
558 "Topology set up, now starting peers!\n");
560 GNUNET_TESTING_daemons_continue_startup(pg);
564 GNUNET_SCHEDULER_cancel (sched, die_task);
565 die_task = GNUNET_SCHEDULER_add_now (sched,
566 &end_badly, "from create topology (bad return)");
568 GNUNET_SCHEDULER_cancel (sched, die_task);
569 die_task = GNUNET_SCHEDULER_add_delayed (sched,
571 &end_badly, "from continue startup (timeout)");
576 peers_started_callback (void *cls,
577 const struct GNUNET_PeerIdentity *id,
578 const struct GNUNET_CONFIGURATION_Handle *cfg,
579 struct GNUNET_TESTING_Daemon *d, const char *emsg)
583 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to start daemon with error: `%s'\n",
587 GNUNET_assert (id != NULL);
589 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %llu out of %llu\n",
590 (num_peers - peers_left) + 1, num_peers);
596 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
597 "All %d daemons started, now creating topology!\n",
600 GNUNET_SCHEDULER_cancel (sched, die_task);
601 /* Set up task in case topology creation doesn't finish
602 * within a reasonable amount of time */
603 die_task = GNUNET_SCHEDULER_add_delayed (sched,
604 GNUNET_TIME_relative_multiply
605 (GNUNET_TIME_UNIT_MINUTES, 5),
606 &end_badly, "from peers_started_callback");
614 * Callback indicating that the hostkey was created for a peer.
617 * @param id the peer identity
618 * @param d the daemon handle (pretty useless at this point, remove?)
619 * @param emsg non-null on failure
621 void hostkey_callback (void *cls,
622 const struct GNUNET_PeerIdentity *id,
623 struct GNUNET_TESTING_Daemon *d,
628 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Hostkey callback received error: %s\n", emsg);
632 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
633 "Hostkey created for peer `%s'\n",
640 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
641 "All %d hostkeys created, now creating topology!\n",
644 GNUNET_SCHEDULER_cancel (sched, die_task);
645 /* Set up task in case topology creation doesn't finish
646 * within a reasonable amount of time */
647 die_task = GNUNET_SCHEDULER_add_delayed (sched,
648 GNUNET_TIME_relative_multiply
649 (GNUNET_TIME_UNIT_MINUTES, 5),
650 &end_badly, "from hostkey_callback");
651 GNUNET_SCHEDULER_add_now(sched, &create_topology, NULL);
658 struct GNUNET_SCHEDULER_Handle *s,
660 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
663 char * connect_topology_str;
664 char * blacklist_topology_str;
665 char * connect_topology_option_str;
666 char * connect_topology_option_modifier_string;
670 dotOutFile = fopen (dotOutFileName, "w");
671 if (dotOutFile != NULL)
673 fprintf (dotOutFile, "strict graph G {\n");
677 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
678 "Starting daemons based on config file %s\n", cfgfile);
681 if (GNUNET_YES != GNUNET_CONFIGURATION_get_value_string(cfg, "paths", "servicehome", &test_directory))
688 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "topology",
689 &topology_str)) && (GNUNET_NO == GNUNET_TESTING_topology_get(&topology, topology_str)))
691 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
692 "Invalid topology `%s' given for section %s option %s\n", topology_str, "TESTING", "TOPOLOGY");
693 topology = GNUNET_TESTING_TOPOLOGY_CLIQUE; /* Defaults to NONE, so set better default here */
697 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "connect_topology",
698 &connect_topology_str)) && (GNUNET_NO == GNUNET_TESTING_topology_get(&connection_topology, connect_topology_str)))
700 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
701 "Invalid connect topology `%s' given for section %s option %s\n", connect_topology_str, "TESTING", "CONNECT_TOPOLOGY");
703 GNUNET_free_non_null(connect_topology_str);
705 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "connect_topology_option",
706 &connect_topology_option_str)) && (GNUNET_NO == GNUNET_TESTING_topology_option_get(&connect_topology_option, connect_topology_option_str)))
708 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
709 "Invalid connect topology option `%s' given for section %s option %s\n", connect_topology_option_str, "TESTING", "CONNECT_TOPOLOGY_OPTION");
710 connect_topology_option = GNUNET_TESTING_TOPOLOGY_OPTION_ALL; /* Defaults to NONE, set to ALL */
712 GNUNET_free_non_null(connect_topology_option_str);
714 GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "connect_topology_option_modifier",
715 &connect_topology_option_modifier_string))
717 if (sscanf(connect_topology_option_modifier_string, "%lf", &connect_topology_option_modifier) != 1)
719 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
720 _("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
721 connect_topology_option_modifier_string,
722 "connect_topology_option_modifier",
725 GNUNET_free (connect_topology_option_modifier_string);
728 if (GNUNET_YES != GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "blacklist_transports",
729 &blacklist_transports))
730 blacklist_transports = NULL;
733 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "blacklist_topology",
734 &blacklist_topology_str)) && (GNUNET_NO == GNUNET_TESTING_topology_get(&blacklist_topology, blacklist_topology_str)))
736 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
737 "Invalid topology `%s' given for section %s option %s\n", topology_str, "TESTING", "BLACKLIST_TOPOLOGY");
739 GNUNET_free_non_null(topology_str);
740 GNUNET_free_non_null(blacklist_topology_str);
743 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers",
745 num_peers = DEFAULT_NUM_PEERS;
749 peers_left = num_peers;
751 /* Set up a task to end testing if peer start fails */
752 die_task = GNUNET_SCHEDULER_add_delayed (sched,
753 GNUNET_TIME_relative_multiply
754 (GNUNET_TIME_UNIT_MINUTES, 5),
755 &end_badly, "didn't start all daemons in reasonable amount of time!!!");
757 pg = GNUNET_TESTING_daemons_start (sched, cfg,
758 peers_left, TIMEOUT, &hostkey_callback, NULL, &peers_started_callback, NULL,
759 &topology_callback, NULL, NULL);
767 char *config_file_name;
768 GNUNET_asprintf(&binary_name, "test-testing-topology-%s", topology_string);
769 GNUNET_asprintf(&config_file_name, "test_testing_data_topology_%s.conf", topology_string);
771 char *const argv[] = {binary_name,
779 struct GNUNET_GETOPT_CommandLineOption options[] = {
780 GNUNET_GETOPT_OPTION_END
782 ret = GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
783 argv, binary_name, "nohelp",
785 if (ret != GNUNET_OK)
787 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "`test-testing-topology-%s': Failed with error code %d\n", topology_string, ret);
789 GNUNET_free(binary_name);
790 GNUNET_free(config_file_name);
795 main (int argc, char *argv[])
798 char *binary_start_pos;
799 char *our_binary_name;
801 binary_start_pos = rindex(argv[0], '/');
802 topology_string = strstr (binary_start_pos,
804 GNUNET_assert (topology_string != NULL);
806 topology_string = strstr (topology_string, "_");
807 GNUNET_assert (topology_string != NULL);
810 GNUNET_asprintf(&our_binary_name, "test-testing-topology_%s", topology_string);
811 GNUNET_asprintf(&dotOutFileName, "topology_%s.dot", topology_string);
813 GNUNET_log_setup (our_binary_name,
823 * Need to remove base directory, subdirectories taken care
824 * of by the testing framework.
826 if (GNUNET_DISK_directory_remove (test_directory) != GNUNET_OK)
828 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Failed to remove testing directory %s\n", test_directory);
830 GNUNET_free(our_binary_name);
834 /* end of test_testing_topology.c */