aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_topology.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-06-17 15:29:40 +0000
committerNathan S. Evans <evans@in.tum.de>2010-06-17 15:29:40 +0000
commit7f06c82295b46f1c8f1f3b16d5e979abea3e5660 (patch)
tree2f30ab82eb3d4bdde81ca75b5fb5fccf4abe79da /src/testing/test_testing_topology.c
parent344da83a5a06b4b4db4eb68972ee49333369f2db (diff)
downloadgnunet-7f06c82295b46f1c8f1f3b16d5e979abea3e5660.tar.gz
gnunet-7f06c82295b46f1c8f1f3b16d5e979abea3e5660.zip
some testing changes, including an api change that likely breaks things for others
Diffstat (limited to 'src/testing/test_testing_topology.c')
-rw-r--r--src/testing/test_testing_topology.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index dfc59ab74..d7bb836e9 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -25,7 +25,7 @@
25#include "gnunet_testing_lib.h" 25#include "gnunet_testing_lib.h"
26#include "gnunet_core_service.h" 26#include "gnunet_core_service.h"
27 27
28#define VERBOSE GNUNET_NO 28#define VERBOSE GNUNET_YES
29 29
30/** 30/**
31 * How long until we fail the whole testcase? 31 * How long until we fail the whole testcase?
@@ -445,6 +445,7 @@ void
445topology_callback (void *cls, 445topology_callback (void *cls,
446 const struct GNUNET_PeerIdentity *first, 446 const struct GNUNET_PeerIdentity *first,
447 const struct GNUNET_PeerIdentity *second, 447 const struct GNUNET_PeerIdentity *second,
448 uint32_t distance,
448 const struct GNUNET_CONFIGURATION_Handle *first_cfg, 449 const struct GNUNET_CONFIGURATION_Handle *first_cfg,
449 const struct GNUNET_CONFIGURATION_Handle *second_cfg, 450 const struct GNUNET_CONFIGURATION_Handle *second_cfg,
450 struct GNUNET_TESTING_Daemon *first_daemon, 451 struct GNUNET_TESTING_Daemon *first_daemon,
@@ -699,7 +700,7 @@ run (void *cls,
699 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 700 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
700 "Invalid connect topology `%s' given for section %s option %s\n", connect_topology_str, "TESTING", "CONNECT_TOPOLOGY"); 701 "Invalid connect topology `%s' given for section %s option %s\n", connect_topology_str, "TESTING", "CONNECT_TOPOLOGY");
701 } 702 }
702 703 GNUNET_free_non_null(connect_topology_str);
703 if ((GNUNET_YES == 704 if ((GNUNET_YES ==
704 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "connect_topology_option", 705 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "connect_topology_option",
705 &connect_topology_option_str)) && (GNUNET_NO == GNUNET_TESTING_topology_option_get(&connect_topology_option, connect_topology_option_str))) 706 &connect_topology_option_str)) && (GNUNET_NO == GNUNET_TESTING_topology_option_get(&connect_topology_option, connect_topology_option_str)))
@@ -708,7 +709,7 @@ run (void *cls,
708 "Invalid connect topology option `%s' given for section %s option %s\n", connect_topology_option_str, "TESTING", "CONNECT_TOPOLOGY_OPTION"); 709 "Invalid connect topology option `%s' given for section %s option %s\n", connect_topology_option_str, "TESTING", "CONNECT_TOPOLOGY_OPTION");
709 connect_topology_option = GNUNET_TESTING_TOPOLOGY_OPTION_ALL; /* Defaults to NONE, set to ALL */ 710 connect_topology_option = GNUNET_TESTING_TOPOLOGY_OPTION_ALL; /* Defaults to NONE, set to ALL */
710 } 711 }
711 712 GNUNET_free_non_null(connect_topology_option_str);
712 if (GNUNET_YES == 713 if (GNUNET_YES ==
713 GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "connect_topology_option_modifier", 714 GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "connect_topology_option_modifier",
714 &connect_topology_option_modifier_string)) 715 &connect_topology_option_modifier_string))
@@ -730,11 +731,13 @@ run (void *cls,
730 731
731 if ((GNUNET_YES == 732 if ((GNUNET_YES ==
732 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "blacklist_topology", 733 GNUNET_CONFIGURATION_get_value_string(cfg, "testing", "blacklist_topology",
733 & blacklist_topology_str)) && (GNUNET_NO == GNUNET_TESTING_topology_get(&blacklist_topology, blacklist_topology_str))) 734 &blacklist_topology_str)) && (GNUNET_NO == GNUNET_TESTING_topology_get(&blacklist_topology, blacklist_topology_str)))
734 { 735 {
735 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 736 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
736 "Invalid topology `%s' given for section %s option %s\n", topology_str, "TESTING", "BLACKLIST_TOPOLOGY"); 737 "Invalid topology `%s' given for section %s option %s\n", topology_str, "TESTING", "BLACKLIST_TOPOLOGY");
737 } 738 }
739 GNUNET_free_non_null(topology_str);
740 GNUNET_free_non_null(blacklist_topology_str);
738 741
739 if (GNUNET_SYSERR == 742 if (GNUNET_SYSERR ==
740 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers", 743 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers",