diff options
-rw-r--r-- | src/ats-tests/Makefile.am | 178 | ||||
-rw-r--r-- | src/ats-tests/perf_ats.c | 236 |
2 files changed, 329 insertions, 85 deletions
diff --git a/src/ats-tests/Makefile.am b/src/ats-tests/Makefile.am index 931d3e5b5..a281f0458 100644 --- a/src/ats-tests/Makefile.am +++ b/src/ats-tests/Makefile.am | |||
@@ -13,21 +13,31 @@ if USE_COVERAGE | |||
13 | endif | 13 | endif |
14 | 14 | ||
15 | if HAVE_LIBGLPK | 15 | if HAVE_LIBGLPK |
16 | PERF_MLP_NONE = perf_ats_mlp_none | 16 | PERF_MLP = perf_ats_mlp_transport_none \ |
17 | PERF_MLP_BANDWIDTH = perf_ats_mlp_bandwidth | 17 | perf_ats_mlp_core_none \ |
18 | PERF_MLP_LATENCY = perf_ats_mlp_latency | 18 | perf_ats_mlp_transport_bandwidth \ |
19 | perf_ats_mlp_core_bandwidth \ | ||
20 | perf_ats_mlp_transport_latency \ | ||
21 | perf_ats_mlp_core_latency | ||
19 | endif | 22 | endif |
20 | 23 | ||
21 | if HAVE_TESTING | 24 | if HAVE_TESTING |
22 | TESTING_TESTS = \ | 25 | TESTING_TESTS = \ |
23 | perf_ats_proportional_none \ | 26 | perf_ats_proportional_transport_none \ |
24 | perf_ats_proportional_bandwidth \ | 27 | perf_ats_proportional_core_none \ |
25 | perf_ats_proportional_latency \ | 28 | perf_ats_proportional_transport_bandwidth \ |
29 | perf_ats_proportional_core_bandwidth \ | ||
30 | perf_ats_proportional_transport_latency \ | ||
31 | perf_ats_proportional_core_latency \ | ||
32 | #$(PERF_MLP) | ||
26 | #perf_ats_mlp_none | 33 | #perf_ats_mlp_none |
27 | #perf_ats_mlp_bandwidth | 34 | #perf_ats_mlp_bandwidth |
28 | #perf_ats_ril_none | 35 | #perf_ats_ril_transport_none \ |
29 | #perf_ats_ril_bandwidth | 36 | #perf_ats_ril_core_none \ |
30 | #perf_ats_ril_latency | 37 | #perf_ats_ril_transport_bandwidth \ |
38 | #perf_ats_ril_core_bandwidth \ | ||
39 | #perf_ats_ril_transport_latency \ | ||
40 | #perf_ats_ril_core_latency | ||
31 | endif | 41 | endif |
32 | 42 | ||
33 | check_PROGRAMS = \ | 43 | check_PROGRAMS = \ |
@@ -37,79 +47,169 @@ if ENABLE_TEST_RUN | |||
37 | TESTS = $(check_PROGRAMS) | 47 | TESTS = $(check_PROGRAMS) |
38 | endif | 48 | endif |
39 | 49 | ||
40 | perf_ats_proportional_none_SOURCES = \ | 50 | perf_ats_proportional_core_none_SOURCES = \ |
41 | perf_ats.c | 51 | perf_ats.c |
42 | perf_ats_proportional_none_LDADD = \ | 52 | perf_ats_proportional_core_none_LDADD = \ |
43 | $(top_builddir)/src/util/libgnunetutil.la \ | 53 | $(top_builddir)/src/util/libgnunetutil.la \ |
44 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 54 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
45 | $(top_builddir)/src/ats/libgnunetats.la \ | 55 | $(top_builddir)/src/ats/libgnunetats.la \ |
46 | $(top_builddir)/src/core/libgnunetcore.la | 56 | $(top_builddir)/src/core/libgnunetcore.la \ |
57 | $(top_builddir)/src/transport/libgnunettransport.la | ||
47 | 58 | ||
48 | perf_ats_proportional_bandwidth_SOURCES = \ | 59 | perf_ats_proportional_transport_none_SOURCES = \ |
49 | perf_ats.c | 60 | perf_ats.c |
50 | perf_ats_proportional_bandwidth_LDADD = \ | 61 | perf_ats_proportional_transport_none_LDADD = \ |
51 | $(top_builddir)/src/util/libgnunetutil.la \ | 62 | $(top_builddir)/src/util/libgnunetutil.la \ |
52 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 63 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
53 | $(top_builddir)/src/ats/libgnunetats.la \ | 64 | $(top_builddir)/src/ats/libgnunetats.la \ |
54 | $(top_builddir)/src/core/libgnunetcore.la | 65 | $(top_builddir)/src/core/libgnunetcore.la \ |
66 | $(top_builddir)/src/transport/libgnunettransport.la | ||
55 | 67 | ||
56 | perf_ats_proportional_latency_SOURCES = \ | 68 | perf_ats_proportional_core_bandwidth_SOURCES = \ |
57 | perf_ats.c | 69 | perf_ats.c |
58 | perf_ats_proportional_latency_LDADD = \ | 70 | perf_ats_proportional_core_bandwidth_LDADD = \ |
59 | $(top_builddir)/src/util/libgnunetutil.la \ | 71 | $(top_builddir)/src/util/libgnunetutil.la \ |
60 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 72 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
61 | $(top_builddir)/src/ats/libgnunetats.la \ | 73 | $(top_builddir)/src/ats/libgnunetats.la \ |
62 | $(top_builddir)/src/core/libgnunetcore.la | 74 | $(top_builddir)/src/core/libgnunetcore.la \ |
75 | $(top_builddir)/src/transport/libgnunettransport.la | ||
76 | |||
77 | perf_ats_proportional_transport_bandwidth_SOURCES = \ | ||
78 | perf_ats.c | ||
79 | perf_ats_proportional_transport_bandwidth_LDADD = \ | ||
80 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
81 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
82 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
83 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
84 | $(top_builddir)/src/transport/libgnunettransport.la | ||
85 | |||
86 | perf_ats_proportional_core_latency_SOURCES = \ | ||
87 | perf_ats.c | ||
88 | perf_ats_proportional_core_latency_LDADD = \ | ||
89 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
90 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
91 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
92 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
93 | $(top_builddir)/src/transport/libgnunettransport.la | ||
94 | |||
95 | perf_ats_proportional_transport_latency_SOURCES = \ | ||
96 | perf_ats.c | ||
97 | perf_ats_proportional_transport_latency_LDADD = \ | ||
98 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
99 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
100 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
101 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
102 | $(top_builddir)/src/transport/libgnunettransport.la | ||
63 | 103 | ||
64 | if HAVE_LIBGLPK | 104 | if HAVE_LIBGLPK |
65 | perf_ats_mlp_none_SOURCES = \ | 105 | perf_ats_mlp_core_none_SOURCES = \ |
66 | perf_ats.c | 106 | perf_ats.c |
67 | perf_ats_mlp_none_LDADD = \ | 107 | perf_ats_mlp_core_none_LDADD = \ |
68 | $(top_builddir)/src/util/libgnunetutil.la \ | 108 | $(top_builddir)/src/util/libgnunetutil.la \ |
69 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 109 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
70 | $(top_builddir)/src/ats/libgnunetats.la \ | 110 | $(top_builddir)/src/ats/libgnunetats.la \ |
71 | $(top_builddir)/src/core/libgnunetcore.la | 111 | $(top_builddir)/src/core/libgnunetcore.la \ |
72 | 112 | $(top_builddir)/src/transport/libgnunettransport.la | |
73 | perf_ats_mlp_bandwidth_SOURCES = \ | 113 | |
114 | perf_ats_mlp_transport_none_SOURCES = \ | ||
74 | perf_ats.c | 115 | perf_ats.c |
75 | perf_ats_mlp_bandwidth_LDADD = \ | 116 | perf_ats_mlp_transport_none_LDADD = \ |
76 | $(top_builddir)/src/util/libgnunetutil.la \ | 117 | $(top_builddir)/src/util/libgnunetutil.la \ |
77 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 118 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
78 | $(top_builddir)/src/ats/libgnunetats.la \ | 119 | $(top_builddir)/src/ats/libgnunetats.la \ |
79 | $(top_builddir)/src/core/libgnunetcore.la | 120 | $(top_builddir)/src/core/libgnunetcore.la \ |
80 | 121 | $(top_builddir)/src/transport/libgnunettransport.la | |
81 | perf_ats_mlp_latency_SOURCES = \ | 122 | |
123 | perf_ats_mlp_core_bandwidth_SOURCES = \ | ||
82 | perf_ats.c | 124 | perf_ats.c |
83 | perf_ats_mlp_latency_LDADD = \ | 125 | perf_ats_mlp_core_bandwidth_LDADD = \ |
84 | $(top_builddir)/src/util/libgnunetutil.la \ | 126 | $(top_builddir)/src/util/libgnunetutil.la \ |
85 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 127 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
86 | $(top_builddir)/src/ats/libgnunetats.la \ | 128 | $(top_builddir)/src/ats/libgnunetats.la \ |
87 | $(top_builddir)/src/core/libgnunetcore.la | 129 | $(top_builddir)/src/core/libgnunetcore.la \ |
130 | $(top_builddir)/src/transport/libgnunettransport.la | ||
131 | |||
132 | perf_ats_mlp_transport_bandwidth_SOURCES = \ | ||
133 | perf_ats.c | ||
134 | perf_ats_mlp_transport_bandwidth_LDADD = \ | ||
135 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
136 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
137 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
138 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
139 | $(top_builddir)/src/transport/libgnunettransport.la | ||
140 | |||
141 | perf_ats_mlp_core_latency_SOURCES = \ | ||
142 | perf_ats.c | ||
143 | perf_ats_mlp_core_latency_LDADD = \ | ||
144 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
145 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
146 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
147 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
148 | $(top_builddir)/src/transport/libgnunettransport.la | ||
149 | |||
150 | perf_ats_mlp_transport_latency_SOURCES = \ | ||
151 | perf_ats.c | ||
152 | perf_ats_mlp_transport_latency_LDADD = \ | ||
153 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
154 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
155 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
156 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
157 | $(top_builddir)/src/transport/libgnunettransport.la | ||
88 | endif | 158 | endif |
89 | 159 | ||
90 | perf_ats_ril_none_SOURCES = \ | 160 | perf_ats_ril_core_none_SOURCES = \ |
91 | perf_ats.c | 161 | perf_ats.c |
92 | perf_ats_ril_none_LDADD = \ | 162 | perf_ats_ril_core_none_LDADD = \ |
93 | $(top_builddir)/src/util/libgnunetutil.la \ | 163 | $(top_builddir)/src/util/libgnunetutil.la \ |
94 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 164 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
95 | $(top_builddir)/src/ats/libgnunetats.la \ | 165 | $(top_builddir)/src/ats/libgnunetats.la \ |
96 | $(top_builddir)/src/core/libgnunetcore.la | 166 | $(top_builddir)/src/core/libgnunetcore.la \ |
167 | $(top_builddir)/src/transport/libgnunettransport.la | ||
97 | 168 | ||
98 | perf_ats_ril_bandwidth_SOURCES = \ | 169 | perf_ats_ril_transport_none_SOURCES = \ |
99 | perf_ats.c | 170 | perf_ats.c |
100 | perf_ats_ril_bandwidth_LDADD = \ | 171 | perf_ats_ril_transport_none_LDADD = \ |
101 | $(top_builddir)/src/util/libgnunetutil.la \ | 172 | $(top_builddir)/src/util/libgnunetutil.la \ |
102 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 173 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
103 | $(top_builddir)/src/ats/libgnunetats.la \ | 174 | $(top_builddir)/src/ats/libgnunetats.la \ |
104 | $(top_builddir)/src/core/libgnunetcore.la | 175 | $(top_builddir)/src/core/libgnunetcore.la \ |
105 | 176 | $(top_builddir)/src/transport/libgnunettransport.la | |
106 | perf_ats_ril_latency_SOURCES = \ | 177 | |
178 | perf_ats_ril_core_bandwidth_SOURCES = \ | ||
179 | perf_ats.c | ||
180 | perf_ats_ril_core_bandwidth_LDADD = \ | ||
181 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
182 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
183 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
184 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
185 | $(top_builddir)/src/transport/libgnunettransport.la | ||
186 | |||
187 | perf_ats_ril_transport_bandwidth_SOURCES = \ | ||
188 | perf_ats.c | ||
189 | perf_ats_ril_transport_bandwidth_LDADD = \ | ||
190 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
191 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
192 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
193 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
194 | $(top_builddir)/src/transport/libgnunettransport.la | ||
195 | |||
196 | perf_ats_ril_core_latency_SOURCES = \ | ||
197 | perf_ats.c | ||
198 | perf_ats_ril_core_latency_LDADD = \ | ||
199 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
200 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
201 | $(top_builddir)/src/ats/libgnunetats.la \ | ||
202 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
203 | $(top_builddir)/src/transport/libgnunettransport.la | ||
204 | |||
205 | perf_ats_ril_transport_latency_SOURCES = \ | ||
107 | perf_ats.c | 206 | perf_ats.c |
108 | perf_ats_ril_latency_LDADD = \ | 207 | perf_ats_ril_transport_latency_LDADD = \ |
109 | $(top_builddir)/src/util/libgnunetutil.la \ | 208 | $(top_builddir)/src/util/libgnunetutil.la \ |
110 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 209 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
111 | $(top_builddir)/src/ats/libgnunetats.la \ | 210 | $(top_builddir)/src/ats/libgnunetats.la \ |
112 | $(top_builddir)/src/core/libgnunetcore.la | 211 | $(top_builddir)/src/core/libgnunetcore.la \ |
212 | $(top_builddir)/src/transport/libgnunettransport.la | ||
113 | 213 | ||
114 | EXTRA_DIST = \ | 214 | EXTRA_DIST = \ |
115 | perf_ats_proportional_none.conf \ | 215 | perf_ats_proportional_none.conf \ |
diff --git a/src/ats-tests/perf_ats.c b/src/ats-tests/perf_ats.c index a50de992f..4757a78d2 100644 --- a/src/ats-tests/perf_ats.c +++ b/src/ats-tests/perf_ats.c | |||
@@ -62,7 +62,12 @@ struct BenchmarkPartner | |||
62 | /** | 62 | /** |
63 | * Core transmit handles | 63 | * Core transmit handles |
64 | */ | 64 | */ |
65 | void *cth; | 65 | struct GNUNET_CORE_TransmitHandle *cth; |
66 | |||
67 | /** | ||
68 | * Transport transmit handles | ||
69 | */ | ||
70 | struct GNUNET_TRANSPORT_TransmitHandle *tth; | ||
66 | 71 | ||
67 | /** | 72 | /** |
68 | * Number of messages sent to this partner | 73 | * Number of messages sent to this partner |
@@ -144,7 +149,7 @@ struct BenchmarkPeer | |||
144 | /** | 149 | /** |
145 | * Testbed operation to connect to core | 150 | * Testbed operation to connect to core |
146 | */ | 151 | */ |
147 | struct GNUNET_TESTBED_Operation *core_op; | 152 | struct GNUNET_TESTBED_Operation *comm_op; |
148 | 153 | ||
149 | /** | 154 | /** |
150 | * ATS performance handle | 155 | * ATS performance handle |
@@ -163,6 +168,11 @@ struct BenchmarkPeer | |||
163 | struct GNUNET_CORE_Handle *ch; | 168 | struct GNUNET_CORE_Handle *ch; |
164 | 169 | ||
165 | /** | 170 | /** |
171 | * Core handle | ||
172 | */ | ||
173 | struct GNUNET_TRANSPORT_Handle *th; | ||
174 | |||
175 | /** | ||
166 | * Masters only: | 176 | * Masters only: |
167 | * Peer to set ATS preferences for | 177 | * Peer to set ATS preferences for |
168 | */ | 178 | */ |
@@ -227,7 +237,7 @@ struct BenchmarkState | |||
227 | int connected_ATS_service; | 237 | int connected_ATS_service; |
228 | 238 | ||
229 | /* Are we connected to CORE service of all peers: GNUNET_YES/NO */ | 239 | /* Are we connected to CORE service of all peers: GNUNET_YES/NO */ |
230 | int connected_CORE_service; | 240 | int connected_COMM_service; |
231 | 241 | ||
232 | /* Are we connected to all peers: GNUNET_YES/NO */ | 242 | /* Are we connected to all peers: GNUNET_YES/NO */ |
233 | int connected_PEERS; | 243 | int connected_PEERS; |
@@ -254,6 +264,10 @@ static GNUNET_SCHEDULER_TaskIdentifier progress_task; | |||
254 | */ | 264 | */ |
255 | static int result; | 265 | static int result; |
256 | 266 | ||
267 | /**Test core (GNUNET_YES) or transport (GNUNET_NO) | ||
268 | */ | ||
269 | static int test_core; | ||
270 | |||
257 | /** | 271 | /** |
258 | * Solver string | 272 | * Solver string |
259 | */ | 273 | */ |
@@ -371,6 +385,12 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
371 | GNUNET_CORE_notify_transmit_ready_cancel (mps[c_m].partners[c_op].cth); | 385 | GNUNET_CORE_notify_transmit_ready_cancel (mps[c_m].partners[c_op].cth); |
372 | mps[c_m].partners[c_op].cth = NULL; | 386 | mps[c_m].partners[c_op].cth = NULL; |
373 | } | 387 | } |
388 | if (NULL != mps[c_m].partners[c_op].tth) | ||
389 | { | ||
390 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (mps[c_m].partners[c_op].tth); | ||
391 | mps[c_m].partners[c_op].tth = NULL; | ||
392 | } | ||
393 | |||
374 | 394 | ||
375 | if (NULL != mps[c_m].core_connect_ops[c_op].connect_op) | 395 | if (NULL != mps[c_m].core_connect_ops[c_op].connect_op) |
376 | { | 396 | { |
@@ -389,10 +409,10 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
389 | mps[c_m].ats_perf_op = NULL; | 409 | mps[c_m].ats_perf_op = NULL; |
390 | } | 410 | } |
391 | 411 | ||
392 | if (NULL != mps[c_m].core_op) | 412 | if (NULL != mps[c_m].comm_op) |
393 | { | 413 | { |
394 | GNUNET_TESTBED_operation_done (mps[c_m].core_op); | 414 | GNUNET_TESTBED_operation_done (mps[c_m].comm_op); |
395 | mps[c_m].core_op = NULL; | 415 | mps[c_m].comm_op = NULL; |
396 | } | 416 | } |
397 | GNUNET_free(mps[c_m].core_connect_ops); | 417 | GNUNET_free(mps[c_m].core_connect_ops); |
398 | GNUNET_free(mps[c_m].partners); | 418 | GNUNET_free(mps[c_m].partners); |
@@ -414,6 +434,12 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
414 | GNUNET_CORE_notify_transmit_ready_cancel (sps[c_s].partners[c_op].cth); | 434 | GNUNET_CORE_notify_transmit_ready_cancel (sps[c_s].partners[c_op].cth); |
415 | sps[c_s].partners[c_op].cth = NULL; | 435 | sps[c_s].partners[c_op].cth = NULL; |
416 | } | 436 | } |
437 | |||
438 | if (NULL != sps[c_s].partners[c_op].tth) | ||
439 | { | ||
440 | GNUNET_TRANSPORT_notify_transmit_ready_cancel (sps[c_s].partners[c_op].tth); | ||
441 | sps[c_s].partners[c_op].tth = NULL; | ||
442 | } | ||
417 | } | 443 | } |
418 | 444 | ||
419 | if (NULL != sps[c_s].ats_perf_op) | 445 | if (NULL != sps[c_s].ats_perf_op) |
@@ -421,10 +447,10 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
421 | GNUNET_TESTBED_operation_done (sps[c_s].ats_perf_op); | 447 | GNUNET_TESTBED_operation_done (sps[c_s].ats_perf_op); |
422 | sps[c_s].ats_perf_op = NULL; | 448 | sps[c_s].ats_perf_op = NULL; |
423 | } | 449 | } |
424 | if (NULL != sps[c_s].core_op) | 450 | if (NULL != sps[c_s].comm_op) |
425 | { | 451 | { |
426 | GNUNET_TESTBED_operation_done (sps[c_s].core_op); | 452 | GNUNET_TESTBED_operation_done (sps[c_s].comm_op); |
427 | sps[c_s].core_op = NULL; | 453 | sps[c_s].comm_op = NULL; |
428 | } | 454 | } |
429 | 455 | ||
430 | GNUNET_free(sps[c_s].partners); | 456 | GNUNET_free(sps[c_s].partners); |
@@ -479,13 +505,17 @@ controller_event_cb (void *cls, | |||
479 | } | 505 | } |
480 | 506 | ||
481 | static size_t | 507 | static size_t |
482 | core_send_ready (void *cls, size_t size, void *buf) | 508 | comm_send_ready (void *cls, size_t size, void *buf) |
483 | { | 509 | { |
484 | static char msgbuf[TEST_MESSAGE_SIZE]; | 510 | static char msgbuf[TEST_MESSAGE_SIZE]; |
485 | struct BenchmarkPartner *partner = cls; | 511 | struct BenchmarkPartner *partner = cls; |
486 | struct GNUNET_MessageHeader *msg; | 512 | struct GNUNET_MessageHeader *msg; |
487 | 513 | ||
488 | partner->cth = NULL; | 514 | if (GNUNET_YES == test_core) |
515 | partner->cth = NULL; | ||
516 | else | ||
517 | partner->tth = NULL; | ||
518 | |||
489 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Master [%u]: Sending PING to [%u]\n", | 519 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Master [%u]: Sending PING to [%u]\n", |
490 | partner->me->no, partner->dest->no); | 520 | partner->me->no, partner->dest->no); |
491 | 521 | ||
@@ -540,7 +570,7 @@ do_benchmark () | |||
540 | int c_s; | 570 | int c_s; |
541 | 571 | ||
542 | if ((state.connected_ATS_service == GNUNET_NO) | 572 | if ((state.connected_ATS_service == GNUNET_NO) |
543 | || (state.connected_CORE_service == GNUNET_NO) | 573 | || (state.connected_COMM_service == GNUNET_NO) |
544 | || (state.connected_PEERS == GNUNET_NO) | 574 | || (state.connected_PEERS == GNUNET_NO) |
545 | || (state.connected_CORE == GNUNET_NO)) | 575 | || (state.connected_CORE == GNUNET_NO)) |
546 | return; | 576 | return; |
@@ -560,9 +590,16 @@ do_benchmark () | |||
560 | { | 590 | { |
561 | for (c_s = 0; c_s < num_slaves; c_s++) | 591 | for (c_s = 0; c_s < num_slaves; c_s++) |
562 | { | 592 | { |
563 | mps[c_m].partners[c_s].cth = GNUNET_CORE_notify_transmit_ready ( | 593 | if (GNUNET_YES == test_core) |
594 | mps[c_m].partners[c_s].cth = GNUNET_CORE_notify_transmit_ready ( | ||
564 | mps[c_m].ch, GNUNET_NO, 0, GNUNET_TIME_UNIT_MINUTES, &sps[c_s].id, | 595 | mps[c_m].ch, GNUNET_NO, 0, GNUNET_TIME_UNIT_MINUTES, &sps[c_s].id, |
565 | TEST_MESSAGE_SIZE, &core_send_ready, &mps[c_m].partners[c_s]); | 596 | TEST_MESSAGE_SIZE, &comm_send_ready, &mps[c_m].partners[c_s]); |
597 | else | ||
598 | { | ||
599 | mps[c_m].partners[c_s].tth = GNUNET_TRANSPORT_notify_transmit_ready ( | ||
600 | mps[c_m].th, &sps[c_s].id, TEST_MESSAGE_SIZE, 0,GNUNET_TIME_UNIT_MINUTES, | ||
601 | &comm_send_ready, &mps[c_m].partners[c_s]); | ||
602 | } | ||
566 | } | 603 | } |
567 | if (pref_val != GNUNET_ATS_PREFERENCE_END) | 604 | if (pref_val != GNUNET_ATS_PREFERENCE_END) |
568 | mps[c_m].ats_task = GNUNET_SCHEDULER_add_now (&ats_pref_task, &mps[c_m]); | 605 | mps[c_m].ats_task = GNUNET_SCHEDULER_add_now (&ats_pref_task, &mps[c_m]); |
@@ -614,7 +651,7 @@ do_connect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
614 | struct BenchmarkPeer *p; | 651 | struct BenchmarkPeer *p; |
615 | 652 | ||
616 | if ((state.connected_ATS_service == GNUNET_NO) | 653 | if ((state.connected_ATS_service == GNUNET_NO) |
617 | || (state.connected_CORE_service == GNUNET_NO)) | 654 | || (state.connected_COMM_service == GNUNET_NO)) |
618 | return; | 655 | return; |
619 | 656 | ||
620 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Connecting peers on CORE level\n")); | 657 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Connecting peers on CORE level\n")); |
@@ -656,7 +693,7 @@ do_connect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
656 | * @param peer peer identity this notification is about | 693 | * @param peer peer identity this notification is about |
657 | */ | 694 | */ |
658 | static void | 695 | static void |
659 | core_connect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) | 696 | comm_connect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) |
660 | { | 697 | { |
661 | struct BenchmarkPeer *me = cls; | 698 | struct BenchmarkPeer *me = cls; |
662 | struct BenchmarkPeer *remote; | 699 | struct BenchmarkPeer *remote; |
@@ -707,7 +744,7 @@ core_connect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) | |||
707 | } | 744 | } |
708 | 745 | ||
709 | static void | 746 | static void |
710 | core_disconnect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) | 747 | comm_disconnect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) |
711 | { | 748 | { |
712 | struct BenchmarkPeer *me = cls; | 749 | struct BenchmarkPeer *me = cls; |
713 | struct BenchmarkPeer *remote; | 750 | struct BenchmarkPeer *remote; |
@@ -736,13 +773,16 @@ core_disconnect_cb (void *cls, const struct GNUNET_PeerIdentity * peer) | |||
736 | } | 773 | } |
737 | 774 | ||
738 | static size_t | 775 | static size_t |
739 | core_send_echo_ready (void *cls, size_t size, void *buf) | 776 | comm_send_pong_ready (void *cls, size_t size, void *buf) |
740 | { | 777 | { |
741 | static char msgbuf[TEST_MESSAGE_SIZE]; | 778 | static char msgbuf[TEST_MESSAGE_SIZE]; |
742 | struct BenchmarkPartner *p = cls; | 779 | struct BenchmarkPartner *p = cls; |
743 | struct GNUNET_MessageHeader *msg; | 780 | struct GNUNET_MessageHeader *msg; |
744 | 781 | ||
745 | p->cth = NULL; | 782 | if (GNUNET_YES == test_core) |
783 | p->cth = NULL; | ||
784 | else | ||
785 | p->tth = NULL; | ||
746 | 786 | ||
747 | p->messages_sent++; | 787 | p->messages_sent++; |
748 | p->bytes_sent += TEST_MESSAGE_SIZE; | 788 | p->bytes_sent += TEST_MESSAGE_SIZE; |
@@ -759,7 +799,7 @@ core_send_echo_ready (void *cls, size_t size, void *buf) | |||
759 | } | 799 | } |
760 | 800 | ||
761 | static int | 801 | static int |
762 | core_handle_ping (void *cls, const struct GNUNET_PeerIdentity *other, | 802 | comm_handle_ping (void *cls, const struct GNUNET_PeerIdentity *other, |
763 | const struct GNUNET_MessageHeader *message) | 803 | const struct GNUNET_MessageHeader *message) |
764 | { | 804 | { |
765 | int c_m; | 805 | int c_m; |
@@ -780,7 +820,6 @@ core_handle_ping (void *cls, const struct GNUNET_PeerIdentity *other, | |||
780 | GNUNET_break(0); | 820 | GNUNET_break(0); |
781 | return GNUNET_SYSERR; | 821 | return GNUNET_SYSERR; |
782 | } | 822 | } |
783 | GNUNET_assert(NULL == p->cth); | ||
784 | 823 | ||
785 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 824 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
786 | "Slave [%u]: Received PING from [%u], sending PONG\n", me->no, | 825 | "Slave [%u]: Received PING from [%u], sending PONG\n", me->no, |
@@ -791,14 +830,25 @@ core_handle_ping (void *cls, const struct GNUNET_PeerIdentity *other, | |||
791 | p->me->total_messages_received++; | 830 | p->me->total_messages_received++; |
792 | p->me->total_bytes_received += TEST_MESSAGE_SIZE; | 831 | p->me->total_bytes_received += TEST_MESSAGE_SIZE; |
793 | 832 | ||
794 | p->cth = GNUNET_CORE_notify_transmit_ready (me->ch, GNUNET_NO, 0, | 833 | if (GNUNET_YES == test_core) |
795 | GNUNET_TIME_UNIT_MINUTES, &p->dest->id, TEST_MESSAGE_SIZE, | 834 | { |
796 | &core_send_echo_ready, p); | 835 | GNUNET_assert (NULL == p->cth); |
836 | p->cth = GNUNET_CORE_notify_transmit_ready (me->ch, GNUNET_NO, 0, | ||
837 | GNUNET_TIME_UNIT_MINUTES, &p->dest->id, TEST_MESSAGE_SIZE, | ||
838 | &comm_send_pong_ready, p); | ||
839 | } | ||
840 | else | ||
841 | { | ||
842 | GNUNET_assert (NULL == p->tth); | ||
843 | p->tth = GNUNET_TRANSPORT_notify_transmit_ready (me->th, &p->dest->id, | ||
844 | TEST_MESSAGE_SIZE, 0, GNUNET_TIME_UNIT_MINUTES, &comm_send_pong_ready, | ||
845 | p); | ||
846 | } | ||
797 | return GNUNET_OK; | 847 | return GNUNET_OK; |
798 | } | 848 | } |
799 | 849 | ||
800 | static int | 850 | static int |
801 | core_handle_pong (void *cls, const struct GNUNET_PeerIdentity *other, | 851 | comm_handle_pong (void *cls, const struct GNUNET_PeerIdentity *other, |
802 | const struct GNUNET_MessageHeader *message) | 852 | const struct GNUNET_MessageHeader *message) |
803 | { | 853 | { |
804 | int c_s; | 854 | int c_s; |
@@ -820,7 +870,6 @@ core_handle_pong (void *cls, const struct GNUNET_PeerIdentity *other, | |||
820 | GNUNET_break(0); | 870 | GNUNET_break(0); |
821 | return GNUNET_SYSERR; | 871 | return GNUNET_SYSERR; |
822 | } | 872 | } |
823 | GNUNET_assert(NULL == p->cth); | ||
824 | 873 | ||
825 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 874 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
826 | "Master [%u]: Received PONG from [%u], next message\n", me->no, | 875 | "Master [%u]: Received PONG from [%u], next message\n", me->no, |
@@ -831,9 +880,20 @@ core_handle_pong (void *cls, const struct GNUNET_PeerIdentity *other, | |||
831 | p->me->total_messages_received++; | 880 | p->me->total_messages_received++; |
832 | p->me->total_bytes_received += TEST_MESSAGE_SIZE; | 881 | p->me->total_bytes_received += TEST_MESSAGE_SIZE; |
833 | 882 | ||
834 | p->cth = GNUNET_CORE_notify_transmit_ready (me->ch, GNUNET_NO, 0, | 883 | if (GNUNET_YES == test_core) |
835 | GNUNET_TIME_UNIT_MINUTES, &p->dest->id, TEST_MESSAGE_SIZE, | 884 | { |
836 | &core_send_ready, p); | 885 | GNUNET_assert (NULL == p->cth); |
886 | p->cth = GNUNET_CORE_notify_transmit_ready (me->ch, GNUNET_NO, 0, | ||
887 | GNUNET_TIME_UNIT_MINUTES, &p->dest->id, TEST_MESSAGE_SIZE, | ||
888 | &comm_send_ready, p); | ||
889 | } | ||
890 | else | ||
891 | { | ||
892 | GNUNET_assert (NULL == p->tth); | ||
893 | p->tth = GNUNET_TRANSPORT_notify_transmit_ready ( | ||
894 | me->th, &p->dest->id, TEST_MESSAGE_SIZE, 0,GNUNET_TIME_UNIT_MINUTES, | ||
895 | &comm_send_ready, p); | ||
896 | } | ||
837 | 897 | ||
838 | return GNUNET_OK; | 898 | return GNUNET_OK; |
839 | } | 899 | } |
@@ -844,11 +904,11 @@ core_connect_adapter (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
844 | struct BenchmarkPeer *me = cls; | 904 | struct BenchmarkPeer *me = cls; |
845 | 905 | ||
846 | static const struct GNUNET_CORE_MessageHandler handlers[] = { { | 906 | static const struct GNUNET_CORE_MessageHandler handlers[] = { { |
847 | &core_handle_ping, TEST_MESSAGE_TYPE_PING, 0 }, { &core_handle_pong, | 907 | &comm_handle_ping, TEST_MESSAGE_TYPE_PING, 0 }, { &comm_handle_pong, |
848 | TEST_MESSAGE_TYPE_PONG, 0 }, { NULL, 0, 0 } }; | 908 | TEST_MESSAGE_TYPE_PONG, 0 }, { NULL, 0, 0 } }; |
849 | 909 | ||
850 | me->ch = GNUNET_CORE_connect (cfg, me, NULL, core_connect_cb, | 910 | me->ch = GNUNET_CORE_connect (cfg, me, NULL, comm_connect_cb, |
851 | core_disconnect_cb, NULL, GNUNET_NO, NULL, GNUNET_NO, handlers); | 911 | comm_disconnect_cb, NULL, GNUNET_NO, NULL, GNUNET_NO, handlers); |
852 | if (NULL == me->ch) | 912 | if (NULL == me->ch) |
853 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to create core connection \n"); | 913 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to create core connection \n"); |
854 | return me->ch; | 914 | return me->ch; |
@@ -864,10 +924,10 @@ core_disconnect_adapter (void *cls, void *op_result) | |||
864 | } | 924 | } |
865 | 925 | ||
866 | static void | 926 | static void |
867 | core_connect_completion_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | 927 | comm_connect_completion_cb (void *cls, struct GNUNET_TESTBED_Operation *op, |
868 | void *ca_result, const char *emsg) | 928 | void *ca_result, const char *emsg) |
869 | { | 929 | { |
870 | static int core_done = 0; | 930 | static int comm_done = 0; |
871 | if ((NULL != emsg) || (NULL == ca_result)) | 931 | if ((NULL != emsg) || (NULL == ca_result)) |
872 | { | 932 | { |
873 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Initialization failed, shutdown\n")); | 933 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, _("Initialization failed, shutdown\n")); |
@@ -877,34 +937,92 @@ core_connect_completion_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
877 | shutdown_task = GNUNET_SCHEDULER_add_now (do_shutdown, NULL ); | 937 | shutdown_task = GNUNET_SCHEDULER_add_now (do_shutdown, NULL ); |
878 | return; | 938 | return; |
879 | } | 939 | } |
880 | core_done++; | 940 | comm_done++; |
881 | 941 | ||
882 | if (core_done == num_slaves + num_masters) | 942 | if (comm_done == num_slaves + num_masters) |
883 | { | 943 | { |
884 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Connected to all CORE services\n"); | 944 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Connected to all %s services\n", |
885 | state.connected_CORE_service = GNUNET_YES; | 945 | (GNUNET_YES == test_core) ? "CORE" : "TRANSPORT"); |
946 | state.connected_COMM_service = GNUNET_YES; | ||
886 | GNUNET_SCHEDULER_add_now (&do_connect_peers, NULL ); | 947 | GNUNET_SCHEDULER_add_now (&do_connect_peers, NULL ); |
887 | } | 948 | } |
888 | } | 949 | } |
889 | 950 | ||
890 | static void | 951 | static void |
891 | do_connect_core (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 952 | transport_recv_cb (void *cls, |
953 | const struct GNUNET_PeerIdentity * peer, | ||
954 | const struct GNUNET_MessageHeader * message) | ||
955 | { | ||
956 | struct BenchmarkPeer *me = cls; | ||
957 | |||
958 | if (TEST_MESSAGE_SIZE != ntohs (message->size) || | ||
959 | (TEST_MESSAGE_TYPE_PING != ntohs (message->type) && | ||
960 | TEST_MESSAGE_TYPE_PONG != ntohs (message->type))) | ||
961 | { | ||
962 | return; | ||
963 | } | ||
964 | if (TEST_MESSAGE_TYPE_PING == ntohs (message->type)) | ||
965 | comm_handle_ping (cls, peer, message); | ||
966 | |||
967 | if (TEST_MESSAGE_TYPE_PONG == ntohs (message->type)) | ||
968 | comm_handle_pong (cls, peer, message); | ||
969 | } | ||
970 | |||
971 | |||
972 | static void * | ||
973 | transport_connect_adapter (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
974 | { | ||
975 | struct BenchmarkPeer *me = cls; | ||
976 | |||
977 | me->th = GNUNET_TRANSPORT_connect (cfg, &me->id, me, &transport_recv_cb, | ||
978 | &comm_connect_cb, &comm_disconnect_cb); | ||
979 | if (NULL == me->th) | ||
980 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to create transport connection \n"); | ||
981 | return me->th; | ||
982 | } | ||
983 | |||
984 | static void | ||
985 | transport_disconnect_adapter (void *cls, void *op_result) | ||
986 | { | ||
987 | struct BenchmarkPeer *me = cls; | ||
988 | |||
989 | GNUNET_TRANSPORT_disconnect (me->th); | ||
990 | me->th = NULL; | ||
991 | } | ||
992 | |||
993 | static void | ||
994 | do_comm_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
892 | { | 995 | { |
893 | int c_s; | 996 | int c_s; |
894 | int c_m; | 997 | int c_m; |
895 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Connecting to all CORE services\n"); | 998 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Connecting to all %s services\n", |
999 | (GNUNET_YES == test_core) ? "CORE" : "TRANSPORT"); | ||
896 | for (c_m = 0; c_m < num_masters; c_m++) | 1000 | for (c_m = 0; c_m < num_masters; c_m++) |
897 | { | 1001 | { |
898 | mps[c_m].core_op = GNUNET_TESTBED_service_connect (NULL, mps[c_m].peer, | 1002 | if (GNUNET_YES == test_core) |
899 | "core", core_connect_completion_cb, NULL, &core_connect_adapter, | 1003 | mps[c_m].comm_op = GNUNET_TESTBED_service_connect (NULL, mps[c_m].peer, |
1004 | "core", &comm_connect_completion_cb, NULL, &core_connect_adapter, | ||
900 | &core_disconnect_adapter, &mps[c_m]); | 1005 | &core_disconnect_adapter, &mps[c_m]); |
1006 | else | ||
1007 | { | ||
1008 | mps[c_m].comm_op = GNUNET_TESTBED_service_connect (NULL, mps[c_m].peer, | ||
1009 | "transport", &comm_connect_completion_cb, NULL, &transport_connect_adapter, | ||
1010 | &transport_disconnect_adapter, &mps[c_m]); | ||
1011 | } | ||
901 | } | 1012 | } |
902 | 1013 | ||
903 | for (c_s = 0; c_s < num_slaves; c_s++) | 1014 | for (c_s = 0; c_s < num_slaves; c_s++) |
904 | { | 1015 | { |
905 | sps[c_s].core_op = GNUNET_TESTBED_service_connect (NULL, sps[c_s].peer, | 1016 | if (GNUNET_YES == test_core) |
906 | "core", core_connect_completion_cb, NULL, &core_connect_adapter, | 1017 | sps[c_s].comm_op = GNUNET_TESTBED_service_connect (NULL, sps[c_s].peer, |
1018 | "core", &comm_connect_completion_cb, NULL, &core_connect_adapter, | ||
907 | &core_disconnect_adapter, &sps[c_s]); | 1019 | &core_disconnect_adapter, &sps[c_s]); |
1020 | else | ||
1021 | { | ||
1022 | sps[c_s].comm_op = GNUNET_TESTBED_service_connect (NULL, sps[c_s].peer, | ||
1023 | "transport", &comm_connect_completion_cb, NULL, &transport_connect_adapter, | ||
1024 | &transport_disconnect_adapter, &sps[c_s]); | ||
1025 | } | ||
908 | } | 1026 | } |
909 | } | 1027 | } |
910 | 1028 | ||
@@ -987,7 +1105,7 @@ ats_connect_completion_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
987 | { | 1105 | { |
988 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Connected to all ATS services\n"); | 1106 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Connected to all ATS services\n"); |
989 | state.connected_ATS_service = GNUNET_YES; | 1107 | state.connected_ATS_service = GNUNET_YES; |
990 | GNUNET_SCHEDULER_add_now (&do_connect_core, NULL ); | 1108 | GNUNET_SCHEDULER_add_now (&do_comm_connect, NULL ); |
991 | } | 1109 | } |
992 | } | 1110 | } |
993 | 1111 | ||
@@ -1119,6 +1237,7 @@ main (int argc, char *argv[]) | |||
1119 | char *tmp_sep; | 1237 | char *tmp_sep; |
1120 | char *test_name; | 1238 | char *test_name; |
1121 | char *conf_name; | 1239 | char *conf_name; |
1240 | char *comm_name; | ||
1122 | char *dotexe; | 1241 | char *dotexe; |
1123 | char *prefs[GNUNET_ATS_PreferenceCount] = GNUNET_ATS_PreferenceTypeString; | 1242 | char *prefs[GNUNET_ATS_PreferenceCount] = GNUNET_ATS_PreferenceTypeString; |
1124 | int c; | 1243 | int c; |
@@ -1144,6 +1263,28 @@ main (int argc, char *argv[]) | |||
1144 | return GNUNET_SYSERR; | 1263 | return GNUNET_SYSERR; |
1145 | } | 1264 | } |
1146 | tmp_sep[0] = '\0'; | 1265 | tmp_sep[0] = '\0'; |
1266 | comm_name = GNUNET_strdup (&tmp_sep[1]); | ||
1267 | tmp_sep = strchr (comm_name, '_'); | ||
1268 | if (NULL == tmp_sep) | ||
1269 | { | ||
1270 | fprintf (stderr, "Unable to parse test name `%s'\n", argv[0]); | ||
1271 | GNUNET_free(solver); | ||
1272 | return GNUNET_SYSERR; | ||
1273 | } | ||
1274 | tmp_sep[0] = '\0'; | ||
1275 | for (c = 0; c <= strlen (comm_name); c++) | ||
1276 | comm_name[c] = toupper (comm_name[c]); | ||
1277 | if (0 == strcmp (comm_name, "CORE")) | ||
1278 | test_core = GNUNET_YES; | ||
1279 | else if (0 == strcmp (comm_name, "TRANSPORT")) | ||
1280 | test_core = GNUNET_NO; | ||
1281 | else | ||
1282 | { | ||
1283 | GNUNET_free (comm_name); | ||
1284 | GNUNET_free (solver); | ||
1285 | return GNUNET_SYSERR; | ||
1286 | } | ||
1287 | |||
1147 | pref_str = GNUNET_strdup(tmp_sep + 1); | 1288 | pref_str = GNUNET_strdup(tmp_sep + 1); |
1148 | 1289 | ||
1149 | GNUNET_asprintf (&conf_name, "%s%s_%s.conf", TESTNAME_PREFIX, solver, | 1290 | GNUNET_asprintf (&conf_name, "%s%s_%s.conf", TESTNAME_PREFIX, solver, |
@@ -1175,6 +1316,7 @@ main (int argc, char *argv[]) | |||
1175 | fprintf (stderr, "Unknown preference: `%s'\n", pref_str); | 1316 | fprintf (stderr, "Unknown preference: `%s'\n", pref_str); |
1176 | GNUNET_free(solver); | 1317 | GNUNET_free(solver); |
1177 | GNUNET_free(pref_str); | 1318 | GNUNET_free(pref_str); |
1319 | GNUNET_free (comm_name); | ||
1178 | return -1; | 1320 | return -1; |
1179 | } | 1321 | } |
1180 | 1322 | ||
@@ -1216,11 +1358,12 @@ main (int argc, char *argv[]) | |||
1216 | GNUNET_free(test_name); | 1358 | GNUNET_free(test_name); |
1217 | GNUNET_free(solver); | 1359 | GNUNET_free(solver); |
1218 | GNUNET_free(pref_str); | 1360 | GNUNET_free(pref_str); |
1361 | GNUNET_free (comm_name); | ||
1219 | return GNUNET_SYSERR; | 1362 | return GNUNET_SYSERR; |
1220 | } | 1363 | } |
1221 | 1364 | ||
1222 | state.connected_ATS_service = GNUNET_NO; | 1365 | state.connected_ATS_service = GNUNET_NO; |
1223 | state.connected_CORE_service = GNUNET_NO; | 1366 | state.connected_COMM_service = GNUNET_NO; |
1224 | state.connected_PEERS = GNUNET_NO; | 1367 | state.connected_PEERS = GNUNET_NO; |
1225 | state.benchmarking = GNUNET_NO; | 1368 | state.benchmarking = GNUNET_NO; |
1226 | state.connected_PEERS = GNUNET_NO; | 1369 | state.connected_PEERS = GNUNET_NO; |
@@ -1241,6 +1384,7 @@ main (int argc, char *argv[]) | |||
1241 | GNUNET_free(pref_str); | 1384 | GNUNET_free(pref_str); |
1242 | GNUNET_free(conf_name); | 1385 | GNUNET_free(conf_name); |
1243 | GNUNET_free(test_name); | 1386 | GNUNET_free(test_name); |
1387 | GNUNET_free (comm_name); | ||
1244 | GNUNET_free(mps); | 1388 | GNUNET_free(mps); |
1245 | GNUNET_free(sps); | 1389 | GNUNET_free(sps); |
1246 | 1390 | ||