aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-10-06 09:34:19 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-06 09:34:19 +0200
commitffa7a0ab292b190ed10cd54645593fe31c5796bc (patch)
tree030328c2b46531e8b4bae878f173c96fb7dd3e80 /src
parent961685fab53555a7b62301982927432988b8fdc2 (diff)
downloadgnunet-ffa7a0ab292b190ed10cd54645593fe31c5796bc.tar.gz
gnunet-ffa7a0ab292b190ed10cd54645593fe31c5796bc.zip
-fix FTBFS
Diffstat (limited to 'src')
-rw-r--r--src/transport/test_transport_plugin_cmd_simple_send.c7
-rw-r--r--src/transport/test_transport_plugin_cmd_simple_send_v2.c7
-rw-r--r--src/transport/test_transport_plugin_cmd_udp_backchannel.c7
-rw-r--r--src/transport/transport_api_cmd_connecting_peers.c18
-rw-r--r--src/transport/transport_api_cmd_connecting_peers_v2.c39
-rw-r--r--src/transport/transport_api_cmd_connecting_peers_v3.c18
-rw-r--r--src/transport/transport_api_cmd_send_simple.c28
-rw-r--r--src/transport/transport_api_cmd_send_simple_v2.c28
-rw-r--r--src/transport/transport_api_cmd_start_peer.c23
-rw-r--r--src/transport/transport_api_cmd_start_peer_v2.c23
-rw-r--r--src/transport/transport_api_cmd_start_peer_v3.c23
-rw-r--r--src/transport/transport_api_cmd_stop_peer.c27
12 files changed, 129 insertions, 119 deletions
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c b/src/transport/test_transport_plugin_cmd_simple_send.c
index 07255a1a5..21167415d 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send.c
@@ -183,9 +183,10 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip,
183 write_message) 183 write_message)
184 }; 184 };
185 185
186 GNUNET_TESTING_run (NULL, 186 GNUNET_TESTING_run (commands,
187 commands, 187 GNUNET_TIME_UNIT_FOREVER_REL,
188 GNUNET_TIME_UNIT_FOREVER_REL); 188 NULL, /* FIXME: will crash */
189 NULL);
189 190
190} 191}
191 192
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_v2.c b/src/transport/test_transport_plugin_cmd_simple_send_v2.c
index c79b5c7e2..98e9d5fca 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send_v2.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_v2.c
@@ -188,9 +188,10 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip,
188 write_message) 188 write_message)
189 }; 189 };
190 190
191 GNUNET_TESTING_run (NULL, 191 GNUNET_TESTING_run (commands,
192 commands, 192 GNUNET_TIME_UNIT_FOREVER_REL,
193 GNUNET_TIME_UNIT_FOREVER_REL); 193 NULL, /* FIXME: will crash */
194 NULL);
194 195
195} 196}
196 197
diff --git a/src/transport/test_transport_plugin_cmd_udp_backchannel.c b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
index 90e474aea..6b0342e51 100644
--- a/src/transport/test_transport_plugin_cmd_udp_backchannel.c
+++ b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
@@ -192,9 +192,10 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip,
192 write_message) 192 write_message)
193 }; 193 };
194 194
195 GNUNET_TESTING_run (NULL, 195 GNUNET_TESTING_run (commands,
196 commands, 196 GNUNET_TIME_UNIT_FOREVER_REL,
197 GNUNET_TIME_UNIT_FOREVER_REL); 197 NULL, /* FIMXE: will crash */
198 NULL);
198 199
199} 200}
200 201
diff --git a/src/transport/transport_api_cmd_connecting_peers.c b/src/transport/transport_api_cmd_connecting_peers.c
index 09ca9e54c..ddf1c3872 100644
--- a/src/transport/transport_api_cmd_connecting_peers.c
+++ b/src/transport/transport_api_cmd_connecting_peers.c
@@ -62,6 +62,8 @@ struct ConnectPeersState
62 * 62 *
63 */ 63 */
64 struct GNUNET_PeerIdentity *id; 64 struct GNUNET_PeerIdentity *id;
65
66 struct GNUNET_TESTING_Interpreter *is;
65}; 67};
66 68
67 69
@@ -71,7 +73,6 @@ struct ConnectPeersState
71 */ 73 */
72static void 74static void
73connect_peers_run (void *cls, 75connect_peers_run (void *cls,
74 const struct GNUNET_TESTING_Command *cmd,
75 struct GNUNET_TESTING_Interpreter *is) 76 struct GNUNET_TESTING_Interpreter *is)
76{ 77{
77 struct ConnectPeersState *cps = cls; 78 struct ConnectPeersState *cps = cls;
@@ -96,7 +97,9 @@ connect_peers_run (void *cls,
96 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity); 97 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity);
97 uint32_t num; 98 uint32_t num;
98 99
99 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 100 cps->is = is;
101 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
102 cps->start_peer_label);
100 GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd, 103 GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd,
101 &ah); 104 &ah);
102 105
@@ -106,7 +109,8 @@ connect_peers_run (void *cls,
106 GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd, 109 GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd,
107 &id); 110 &id);
108 111
109 system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label); 112 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
113 cps->create_label);
110 GNUNET_TESTING_get_trait_test_system (system_cmd, 114 GNUNET_TESTING_get_trait_test_system (system_cmd,
111 &tl_system); 115 &tl_system);
112 116
@@ -116,8 +120,6 @@ connect_peers_run (void *cls,
116 num = 2; 120 num = 2;
117 121
118 122
119
120
121 // if (strstr (hello, "60002") != NULL) 123 // if (strstr (hello, "60002") != NULL)
122 if (2 == num) 124 if (2 == num)
123 { 125 {
@@ -194,7 +196,8 @@ connect_peers_finish (void *cls,
194 struct GNUNET_HashCode hc; 196 struct GNUNET_HashCode hc;
195 int node_number; 197 int node_number;
196 198
197 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 199 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->is,
200 cps->start_peer_label);
198 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd, 201 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
199 &connected_peers_map); 202 &connected_peers_map);
200 203
@@ -237,8 +240,7 @@ connect_peers_traits (void *cls,
237 * 240 *
238 */ 241 */
239static void 242static void
240connect_peers_cleanup (void *cls, 243connect_peers_cleanup (void *cls)
241 const struct GNUNET_TESTING_Command *cmd)
242{ 244{
243 struct ConnectPeersState *cps = cls; 245 struct ConnectPeersState *cps = cls;
244 246
diff --git a/src/transport/transport_api_cmd_connecting_peers_v2.c b/src/transport/transport_api_cmd_connecting_peers_v2.c
index 0d286b714..8ef556946 100644
--- a/src/transport/transport_api_cmd_connecting_peers_v2.c
+++ b/src/transport/transport_api_cmd_connecting_peers_v2.c
@@ -64,6 +64,8 @@ struct ConnectPeersState
64 * 64 *
65 */ 65 */
66 struct GNUNET_PeerIdentity *id; 66 struct GNUNET_PeerIdentity *id;
67
68 struct GNUNET_TESTING_Interpreter *is;
67}; 69};
68 70
69 71
@@ -73,7 +75,6 @@ struct ConnectPeersState
73 */ 75 */
74static void 76static void
75connect_peers_run (void *cls, 77connect_peers_run (void *cls,
76 const struct GNUNET_TESTING_Command *cmd,
77 struct GNUNET_TESTING_Interpreter *is) 78 struct GNUNET_TESTING_Interpreter *is)
78{ 79{
79 struct ConnectPeersState *cps = cls; 80 struct ConnectPeersState *cps = cls;
@@ -91,11 +92,14 @@ connect_peers_run (void *cls,
91 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity); 92 struct GNUNET_PeerIdentity *other = GNUNET_new (struct GNUNET_PeerIdentity);
92 uint32_t num; 93 uint32_t num;
93 94
94 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 95 cps->is = is;
96 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
97 cps->start_peer_label);
95 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd, 98 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd,
96 &ah); 99 &ah);
97 100
98 system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label); 101 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
102 cps->create_label);
99 GNUNET_TESTING_get_trait_test_system (system_cmd, 103 GNUNET_TESTING_get_trait_test_system (system_cmd,
100 &tl_system); 104 &tl_system);
101 105
@@ -155,7 +159,8 @@ connect_peers_finish (void *cls,
155 struct GNUNET_HashCode hc; 159 struct GNUNET_HashCode hc;
156 int node_number; 160 int node_number;
157 161
158 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 162 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->is,
163 cps->start_peer_label);
159 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd, 164 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd,
160 &connected_peers_map); 165 &connected_peers_map);
161 166
@@ -198,8 +203,7 @@ connect_peers_traits (void *cls,
198 * 203 *
199 */ 204 */
200static void 205static void
201connect_peers_cleanup (void *cls, 206connect_peers_cleanup (void *cls)
202 const struct GNUNET_TESTING_Command *cmd)
203{ 207{
204 struct ConnectPeersState *cps = cls; 208 struct ConnectPeersState *cps = cls;
205 209
@@ -228,15 +232,16 @@ GNUNET_TRANSPORT_cmd_connect_peers_v2 (const char *label,
228 cps->num = num; 232 cps->num = num;
229 cps->create_label = create_label; 233 cps->create_label = create_label;
230 234
231 235 {
232 struct GNUNET_TESTING_Command cmd = { 236 struct GNUNET_TESTING_Command cmd = {
233 .cls = cps, 237 .cls = cps,
234 .label = label, 238 .label = label,
235 .run = &connect_peers_run, 239 .run = &connect_peers_run,
236 .finish = &connect_peers_finish, 240 .finish = &connect_peers_finish,
237 .cleanup = &connect_peers_cleanup, 241 .cleanup = &connect_peers_cleanup,
238 .traits = &connect_peers_traits 242 .traits = &connect_peers_traits
239 }; 243 };
240 244
241 return cmd; 245 return cmd;
246 }
242} 247}
diff --git a/src/transport/transport_api_cmd_connecting_peers_v3.c b/src/transport/transport_api_cmd_connecting_peers_v3.c
index e90781637..a73d81064 100644
--- a/src/transport/transport_api_cmd_connecting_peers_v3.c
+++ b/src/transport/transport_api_cmd_connecting_peers_v3.c
@@ -94,6 +94,8 @@ struct ConnectPeersState
94 */ 94 */
95 struct GNUNET_TESTING_NodeConnection *node_connections_head; 95 struct GNUNET_TESTING_NodeConnection *node_connections_head;
96 96
97 struct GNUNET_TESTING_Interpreter *is;
98
97 /** 99 /**
98 * Number of connections. 100 * Number of connections.
99 */ 101 */
@@ -264,6 +266,7 @@ calculate_num (struct GNUNET_TESTING_NodeConnection *node_connection,
264 return num; 266 return num;
265} 267}
266 268
269
267static char * 270static char *
268get_address (struct GNUNET_TESTING_NodeConnection *connection, 271get_address (struct GNUNET_TESTING_NodeConnection *connection,
269 char *prefix) 272 char *prefix)
@@ -323,7 +326,6 @@ get_address (struct GNUNET_TESTING_NodeConnection *connection,
323 */ 326 */
324static void 327static void
325connect_peers_run (void *cls, 328connect_peers_run (void *cls,
326 const struct GNUNET_TESTING_Command *cmd,
327 struct GNUNET_TESTING_Interpreter *is) 329 struct GNUNET_TESTING_Interpreter *is)
328{ 330{
329 struct ConnectPeersState *cps = cls; 331 struct ConnectPeersState *cps = cls;
@@ -341,11 +343,14 @@ connect_peers_run (void *cls,
341 struct GNUNET_TESTING_ADDRESS_PREFIX *pos_prefix; 343 struct GNUNET_TESTING_ADDRESS_PREFIX *pos_prefix;
342 unsigned int con_num = 0; 344 unsigned int con_num = 0;
343 345
344 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 346 cps->is = is;
347 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
348 cps->start_peer_label);
345 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd, 349 GNUNET_TRANSPORT_get_trait_application_handle_v2 (peer1_cmd,
346 &ah); 350 &ah);
347 351
348 system_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->create_label); 352 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
353 cps->create_label);
349 GNUNET_TESTING_get_trait_test_system (system_cmd, 354 GNUNET_TESTING_get_trait_test_system (system_cmd,
350 &tl_system); 355 &tl_system);
351 356
@@ -410,7 +415,8 @@ connect_peers_finish (void *cls,
410 struct GNUNET_TESTING_NodeConnection *pos_connection; 415 struct GNUNET_TESTING_NodeConnection *pos_connection;
411 unsigned int num; 416 unsigned int num;
412 417
413 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->start_peer_label); 418 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->is,
419 cps->start_peer_label);
414 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd, 420 GNUNET_TRANSPORT_get_trait_connected_peers_map_v2 (peer1_cmd,
415 &connected_peers_map); 421 &connected_peers_map);
416 422
@@ -430,7 +436,6 @@ connect_peers_finish (void *cls,
430 } 436 }
431 437
432 438
433
434 if (cps->con_num == con_num) 439 if (cps->con_num == con_num)
435 { 440 {
436 cont (cont_cls); 441 cont (cont_cls);
@@ -461,8 +466,7 @@ connect_peers_traits (void *cls,
461 * 466 *
462 */ 467 */
463static void 468static void
464connect_peers_cleanup (void *cls, 469connect_peers_cleanup (void *cls)
465 const struct GNUNET_TESTING_Command *cmd)
466{ 470{
467 struct ConnectPeersState *cps = cls; 471 struct ConnectPeersState *cps = cls;
468 472
diff --git a/src/transport/transport_api_cmd_send_simple.c b/src/transport/transport_api_cmd_send_simple.c
index f9e515c0f..1599dfe97 100644
--- a/src/transport/transport_api_cmd_send_simple.c
+++ b/src/transport/transport_api_cmd_send_simple.c
@@ -80,8 +80,7 @@ send_simple_traits (void *cls,
80 * 80 *
81 */ 81 */
82static void 82static void
83send_simple_cleanup (void *cls, 83send_simple_cleanup (void *cls)
84 const struct GNUNET_TESTING_Command *cmd)
85{ 84{
86 struct SendSimpleState *sss = cls; 85 struct SendSimpleState *sss = cls;
87 86
@@ -95,7 +94,6 @@ send_simple_cleanup (void *cls,
95 */ 94 */
96static void 95static void
97send_simple_run (void *cls, 96send_simple_run (void *cls,
98 const struct GNUNET_TESTING_Command *cmd,
99 struct GNUNET_TESTING_Interpreter *is) 97 struct GNUNET_TESTING_Interpreter *is)
100{ 98{
101 struct SendSimpleState *sss = cls; 99 struct SendSimpleState *sss = cls;
@@ -108,7 +106,8 @@ send_simple_run (void *cls,
108 struct GNUNET_HashCode hc; 106 struct GNUNET_HashCode hc;
109 int node_number; 107 int node_number;
110 108
111 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (sss->start_peer_label); 109 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
110 sss->start_peer_label);
112 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd, 111 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
113 &connected_peers_map); 112 &connected_peers_map);
114 113
@@ -159,14 +158,15 @@ GNUNET_TRANSPORT_cmd_send_simple (const char *label,
159 sss->n = n; 158 sss->n = n;
160 sss->num = num; 159 sss->num = num;
161 sss->start_peer_label = start_peer_label; 160 sss->start_peer_label = start_peer_label;
162 161 {
163 struct GNUNET_TESTING_Command cmd = { 162 struct GNUNET_TESTING_Command cmd = {
164 .cls = sss, 163 .cls = sss,
165 .label = label, 164 .label = label,
166 .run = &send_simple_run, 165 .run = &send_simple_run,
167 .cleanup = &send_simple_cleanup, 166 .cleanup = &send_simple_cleanup,
168 .traits = &send_simple_traits 167 .traits = &send_simple_traits
169 }; 168 };
170 169
171 return cmd; 170 return cmd;
171 }
172} 172}
diff --git a/src/transport/transport_api_cmd_send_simple_v2.c b/src/transport/transport_api_cmd_send_simple_v2.c
index d43c0b425..8d65eb684 100644
--- a/src/transport/transport_api_cmd_send_simple_v2.c
+++ b/src/transport/transport_api_cmd_send_simple_v2.c
@@ -68,8 +68,7 @@ send_simple_traits (void *cls,
68 * 68 *
69 */ 69 */
70static void 70static void
71send_simple_cleanup (void *cls, 71send_simple_cleanup (void *cls)
72 const struct GNUNET_TESTING_Command *cmd)
73{ 72{
74 struct SendSimpleState *sss = cls; 73 struct SendSimpleState *sss = cls;
75 74
@@ -83,7 +82,6 @@ send_simple_cleanup (void *cls,
83 */ 82 */
84static void 83static void
85send_simple_run (void *cls, 84send_simple_run (void *cls,
86 const struct GNUNET_TESTING_Command *cmd,
87 struct GNUNET_TESTING_Interpreter *is) 85 struct GNUNET_TESTING_Interpreter *is)
88{ 86{
89 struct SendSimpleState *sss = cls; 87 struct SendSimpleState *sss = cls;
@@ -96,7 +94,8 @@ send_simple_run (void *cls,
96 struct GNUNET_HashCode hc; 94 struct GNUNET_HashCode hc;
97 int node_number; 95 int node_number;
98 96
99 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (sss->start_peer_label); 97 peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
98 sss->start_peer_label);
100 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd, 99 GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
101 &connected_peers_map); 100 &connected_peers_map);
102 101
@@ -143,14 +142,15 @@ GNUNET_TRANSPORT_cmd_send_simple_v2 (const char *label,
143 sss = GNUNET_new (struct SendSimpleState); 142 sss = GNUNET_new (struct SendSimpleState);
144 sss->num = num; 143 sss->num = num;
145 sss->start_peer_label = start_peer_label; 144 sss->start_peer_label = start_peer_label;
146 145 {
147 struct GNUNET_TESTING_Command cmd = { 146 struct GNUNET_TESTING_Command cmd = {
148 .cls = sss, 147 .cls = sss,
149 .label = label, 148 .label = label,
150 .run = &send_simple_run, 149 .run = &send_simple_run,
151 .cleanup = &send_simple_cleanup, 150 .cleanup = &send_simple_cleanup,
152 .traits = &send_simple_traits 151 .traits = &send_simple_traits
153 }; 152 };
154 153
155 return cmd; 154 return cmd;
155 }
156} 156}
diff --git a/src/transport/transport_api_cmd_start_peer.c b/src/transport/transport_api_cmd_start_peer.c
index f4e92944b..8a53ed22c 100644
--- a/src/transport/transport_api_cmd_start_peer.c
+++ b/src/transport/transport_api_cmd_start_peer.c
@@ -177,7 +177,6 @@ notify_connect (void *cls,
177 */ 177 */
178static void 178static void
179start_peer_run (void *cls, 179start_peer_run (void *cls,
180 const struct GNUNET_TESTING_Command *cmd,
181 struct GNUNET_TESTING_Interpreter *is) 180 struct GNUNET_TESTING_Interpreter *is)
182{ 181{
183 struct StartPeerState *sps = cls; 182 struct StartPeerState *sps = cls;
@@ -195,7 +194,7 @@ start_peer_run (void *cls,
195 LOG (GNUNET_ERROR_TYPE_ERROR, 194 LOG (GNUNET_ERROR_TYPE_ERROR,
196 "File not found: `%s'\n", 195 "File not found: `%s'\n",
197 sps->cfgname); 196 sps->cfgname);
198 GNUNET_TESTING_interpreter_fail (); 197 GNUNET_TESTING_interpreter_fail (is);
199 return; 198 return;
200 } 199 }
201 200
@@ -232,7 +231,8 @@ start_peer_run (void *cls,
232 "UNIXPATH", 231 "UNIXPATH",
233 communicator_unix_path); 232 communicator_unix_path);
234 233
235 system_cmd = GNUNET_TESTING_interpreter_lookup_command (sps->system_label); 234 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
235 sps->system_label);
236 GNUNET_TESTING_get_trait_test_system (system_cmd, 236 GNUNET_TESTING_get_trait_test_system (system_cmd,
237 &tl_system); 237 &tl_system);
238 238
@@ -246,7 +246,7 @@ start_peer_run (void *cls,
246 "Testing library failed to create unique configuration based on `%s'\n", 246 "Testing library failed to create unique configuration based on `%s'\n",
247 sps->cfgname); 247 sps->cfgname);
248 GNUNET_CONFIGURATION_destroy (sps->cfg); 248 GNUNET_CONFIGURATION_destroy (sps->cfg);
249 GNUNET_TESTING_interpreter_fail (); 249 GNUNET_TESTING_interpreter_fail (is);
250 return; 250 return;
251 } 251 }
252 252
@@ -262,7 +262,7 @@ start_peer_run (void *cls,
262 sps->cfgname, 262 sps->cfgname,
263 emsg); 263 emsg);
264 GNUNET_free (emsg); 264 GNUNET_free (emsg);
265 GNUNET_TESTING_interpreter_fail (); 265 GNUNET_TESTING_interpreter_fail (is);
266 return; 266 return;
267 } 267 }
268 268
@@ -272,7 +272,7 @@ start_peer_run (void *cls,
272 "Testing library failed to create unique configuration based on `%s'\n", 272 "Testing library failed to create unique configuration based on `%s'\n",
273 sps->cfgname); 273 sps->cfgname);
274 GNUNET_free (emsg); 274 GNUNET_free (emsg);
275 GNUNET_TESTING_interpreter_fail (); 275 GNUNET_TESTING_interpreter_fail (is);
276 return; 276 return;
277 } 277 }
278 278
@@ -291,7 +291,7 @@ start_peer_run (void *cls,
291 "Testing library failed to obtain peer identity for peer %u\n", 291 "Testing library failed to obtain peer identity for peer %u\n",
292 sps->no); 292 sps->no);
293 GNUNET_free (emsg); 293 GNUNET_free (emsg);
294 GNUNET_TESTING_interpreter_fail (); 294 GNUNET_TESTING_interpreter_fail (is);
295 return; 295 return;
296 } 296 }
297 LOG (GNUNET_ERROR_TYPE_DEBUG, 297 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -312,7 +312,7 @@ start_peer_run (void *cls,
312 sps->cfgname, 312 sps->cfgname,
313 emsg); 313 emsg);
314 GNUNET_free (emsg); 314 GNUNET_free (emsg);
315 GNUNET_TESTING_interpreter_fail (); 315 GNUNET_TESTING_interpreter_fail (is);
316 return; 316 return;
317 } 317 }
318 318
@@ -324,7 +324,7 @@ start_peer_run (void *cls,
324 sps->cfgname, 324 sps->cfgname,
325 emsg); 325 emsg);
326 GNUNET_free (emsg); 326 GNUNET_free (emsg);
327 GNUNET_TESTING_interpreter_fail (); 327 GNUNET_TESTING_interpreter_fail (is);
328 return; 328 return;
329 } 329 }
330 330
@@ -336,7 +336,7 @@ start_peer_run (void *cls,
336 sps->cfgname, 336 sps->cfgname,
337 emsg); 337 emsg);
338 GNUNET_free (emsg); 338 GNUNET_free (emsg);
339 GNUNET_TESTING_interpreter_fail (); 339 GNUNET_TESTING_interpreter_fail (is);
340 return; 340 return;
341 } 341 }
342 sps->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, sps); 342 sps->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, sps);
@@ -348,8 +348,7 @@ start_peer_run (void *cls,
348 * 348 *
349 */ 349 */
350static void 350static void
351start_peer_cleanup (void *cls, 351start_peer_cleanup (void *cls)
352 const struct GNUNET_TESTING_Command *cmd)
353{ 352{
354 struct StartPeerState *sps = cls; 353 struct StartPeerState *sps = cls;
355 354
diff --git a/src/transport/transport_api_cmd_start_peer_v2.c b/src/transport/transport_api_cmd_start_peer_v2.c
index 0e39bd915..2ab58574a 100644
--- a/src/transport/transport_api_cmd_start_peer_v2.c
+++ b/src/transport/transport_api_cmd_start_peer_v2.c
@@ -177,7 +177,6 @@ notify_connect (void *cls,
177 */ 177 */
178static void 178static void
179start_peer_run (void *cls, 179start_peer_run (void *cls,
180 const struct GNUNET_TESTING_Command *cmd,
181 struct GNUNET_TESTING_Interpreter *is) 180 struct GNUNET_TESTING_Interpreter *is)
182{ 181{
183 struct StartPeerState_v2 *sps = cls; 182 struct StartPeerState_v2 *sps = cls;
@@ -195,7 +194,7 @@ start_peer_run (void *cls,
195 LOG (GNUNET_ERROR_TYPE_ERROR, 194 LOG (GNUNET_ERROR_TYPE_ERROR,
196 "File not found: `%s'\n", 195 "File not found: `%s'\n",
197 sps->cfgname); 196 sps->cfgname);
198 GNUNET_TESTING_interpreter_fail (); 197 GNUNET_TESTING_interpreter_fail (is);
199 return; 198 return;
200 } 199 }
201 200
@@ -232,7 +231,8 @@ start_peer_run (void *cls,
232 "UNIXPATH", 231 "UNIXPATH",
233 communicator_unix_path); 232 communicator_unix_path);
234 233
235 system_cmd = GNUNET_TESTING_interpreter_lookup_command (sps->system_label); 234 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
235 sps->system_label);
236 GNUNET_TESTING_get_trait_test_system (system_cmd, 236 GNUNET_TESTING_get_trait_test_system (system_cmd,
237 &tl_system); 237 &tl_system);
238 238
@@ -246,7 +246,7 @@ start_peer_run (void *cls,
246 "Testing library failed to create unique configuration based on `%s'\n", 246 "Testing library failed to create unique configuration based on `%s'\n",
247 sps->cfgname); 247 sps->cfgname);
248 GNUNET_CONFIGURATION_destroy (sps->cfg); 248 GNUNET_CONFIGURATION_destroy (sps->cfg);
249 GNUNET_TESTING_interpreter_fail (); 249 GNUNET_TESTING_interpreter_fail (is);
250 return; 250 return;
251 } 251 }
252 252
@@ -262,7 +262,7 @@ start_peer_run (void *cls,
262 sps->cfgname, 262 sps->cfgname,
263 emsg); 263 emsg);
264 GNUNET_free (emsg); 264 GNUNET_free (emsg);
265 GNUNET_TESTING_interpreter_fail (); 265 GNUNET_TESTING_interpreter_fail (is);
266 return; 266 return;
267 } 267 }
268 268
@@ -272,7 +272,7 @@ start_peer_run (void *cls,
272 "Testing library failed to create unique configuration based on `%s'\n", 272 "Testing library failed to create unique configuration based on `%s'\n",
273 sps->cfgname); 273 sps->cfgname);
274 GNUNET_free (emsg); 274 GNUNET_free (emsg);
275 GNUNET_TESTING_interpreter_fail (); 275 GNUNET_TESTING_interpreter_fail (is);
276 return; 276 return;
277 } 277 }
278 278
@@ -291,7 +291,7 @@ start_peer_run (void *cls,
291 "Testing library failed to obtain peer identity for peer %u\n", 291 "Testing library failed to obtain peer identity for peer %u\n",
292 sps->no); 292 sps->no);
293 GNUNET_free (emsg); 293 GNUNET_free (emsg);
294 GNUNET_TESTING_interpreter_fail (); 294 GNUNET_TESTING_interpreter_fail (is);
295 return; 295 return;
296 } 296 }
297 LOG (GNUNET_ERROR_TYPE_DEBUG, 297 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -312,7 +312,7 @@ start_peer_run (void *cls,
312 sps->cfgname, 312 sps->cfgname,
313 emsg); 313 emsg);
314 GNUNET_free (emsg); 314 GNUNET_free (emsg);
315 GNUNET_TESTING_interpreter_fail (); 315 GNUNET_TESTING_interpreter_fail (is);
316 return; 316 return;
317 } 317 }
318 318
@@ -324,7 +324,7 @@ start_peer_run (void *cls,
324 sps->cfgname, 324 sps->cfgname,
325 emsg); 325 emsg);
326 GNUNET_free (emsg); 326 GNUNET_free (emsg);
327 GNUNET_TESTING_interpreter_fail (); 327 GNUNET_TESTING_interpreter_fail (is);
328 return; 328 return;
329 } 329 }
330 330
@@ -336,7 +336,7 @@ start_peer_run (void *cls,
336 sps->cfgname, 336 sps->cfgname,
337 emsg); 337 emsg);
338 GNUNET_free (emsg); 338 GNUNET_free (emsg);
339 GNUNET_TESTING_interpreter_fail (); 339 GNUNET_TESTING_interpreter_fail (is);
340 return; 340 return;
341 } 341 }
342 sps->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, sps); 342 sps->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, sps);
@@ -348,8 +348,7 @@ start_peer_run (void *cls,
348 * 348 *
349 */ 349 */
350static void 350static void
351start_peer_cleanup (void *cls, 351start_peer_cleanup (void *cls)
352 const struct GNUNET_TESTING_Command *cmd)
353{ 352{
354 struct StartPeerState_v2 *sps = cls; 353 struct StartPeerState_v2 *sps = cls;
355 354
diff --git a/src/transport/transport_api_cmd_start_peer_v3.c b/src/transport/transport_api_cmd_start_peer_v3.c
index b5cefecc8..fa6300ef5 100644
--- a/src/transport/transport_api_cmd_start_peer_v3.c
+++ b/src/transport/transport_api_cmd_start_peer_v3.c
@@ -175,7 +175,6 @@ notify_connect (void *cls,
175 */ 175 */
176static void 176static void
177start_peer_run (void *cls, 177start_peer_run (void *cls,
178 const struct GNUNET_TESTING_Command *cmd,
179 struct GNUNET_TESTING_Interpreter *is) 178 struct GNUNET_TESTING_Interpreter *is)
180{ 179{
181 struct StartPeerState_v2 *sps = cls; 180 struct StartPeerState_v2 *sps = cls;
@@ -194,7 +193,7 @@ start_peer_run (void *cls,
194 LOG (GNUNET_ERROR_TYPE_ERROR, 193 LOG (GNUNET_ERROR_TYPE_ERROR,
195 "File not found: `%s'\n", 194 "File not found: `%s'\n",
196 sps->cfgname); 195 sps->cfgname);
197 GNUNET_TESTING_interpreter_fail (); 196 GNUNET_TESTING_interpreter_fail (is);
198 return; 197 return;
199 } 198 }
200 199
@@ -244,7 +243,8 @@ start_peer_run (void *cls,
244 "UNIXPATH", 243 "UNIXPATH",
245 udp_communicator_unix_path); 244 udp_communicator_unix_path);
246 245
247 system_cmd = GNUNET_TESTING_interpreter_lookup_command (sps->system_label); 246 system_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
247 sps->system_label);
248 GNUNET_TESTING_get_trait_test_system (system_cmd, 248 GNUNET_TESTING_get_trait_test_system (system_cmd,
249 &tl_system); 249 &tl_system);
250 250
@@ -258,7 +258,7 @@ start_peer_run (void *cls,
258 "Testing library failed to create unique configuration based on `%s'\n", 258 "Testing library failed to create unique configuration based on `%s'\n",
259 sps->cfgname); 259 sps->cfgname);
260 GNUNET_CONFIGURATION_destroy (sps->cfg); 260 GNUNET_CONFIGURATION_destroy (sps->cfg);
261 GNUNET_TESTING_interpreter_fail (); 261 GNUNET_TESTING_interpreter_fail (is);
262 return; 262 return;
263 } 263 }
264 264
@@ -274,7 +274,7 @@ start_peer_run (void *cls,
274 sps->cfgname, 274 sps->cfgname,
275 emsg); 275 emsg);
276 GNUNET_free (emsg); 276 GNUNET_free (emsg);
277 GNUNET_TESTING_interpreter_fail (); 277 GNUNET_TESTING_interpreter_fail (is);
278 return; 278 return;
279 } 279 }
280 280
@@ -284,7 +284,7 @@ start_peer_run (void *cls,
284 "Testing library failed to create unique configuration based on `%s'\n", 284 "Testing library failed to create unique configuration based on `%s'\n",
285 sps->cfgname); 285 sps->cfgname);
286 GNUNET_free (emsg); 286 GNUNET_free (emsg);
287 GNUNET_TESTING_interpreter_fail (); 287 GNUNET_TESTING_interpreter_fail (is);
288 return; 288 return;
289 } 289 }
290 290
@@ -303,7 +303,7 @@ start_peer_run (void *cls,
303 "Testing library failed to obtain peer identity for peer %u\n", 303 "Testing library failed to obtain peer identity for peer %u\n",
304 sps->no); 304 sps->no);
305 GNUNET_free (emsg); 305 GNUNET_free (emsg);
306 GNUNET_TESTING_interpreter_fail (); 306 GNUNET_TESTING_interpreter_fail (is);
307 return; 307 return;
308 } 308 }
309 LOG (GNUNET_ERROR_TYPE_DEBUG, 309 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -324,7 +324,7 @@ start_peer_run (void *cls,
324 sps->cfgname, 324 sps->cfgname,
325 emsg); 325 emsg);
326 GNUNET_free (emsg); 326 GNUNET_free (emsg);
327 GNUNET_TESTING_interpreter_fail (); 327 GNUNET_TESTING_interpreter_fail (is);
328 return; 328 return;
329 } 329 }
330 330
@@ -336,7 +336,7 @@ start_peer_run (void *cls,
336 sps->cfgname, 336 sps->cfgname,
337 emsg); 337 emsg);
338 GNUNET_free (emsg); 338 GNUNET_free (emsg);
339 GNUNET_TESTING_interpreter_fail (); 339 GNUNET_TESTING_interpreter_fail (is);
340 return; 340 return;
341 } 341 }
342 342
@@ -348,7 +348,7 @@ start_peer_run (void *cls,
348 sps->cfgname, 348 sps->cfgname,
349 emsg); 349 emsg);
350 GNUNET_free (emsg); 350 GNUNET_free (emsg);
351 GNUNET_TESTING_interpreter_fail (); 351 GNUNET_TESTING_interpreter_fail (is);
352 return; 352 return;
353 } 353 }
354 sps->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, sps); 354 sps->rh_task = GNUNET_SCHEDULER_add_now (retrieve_hello, sps);
@@ -360,8 +360,7 @@ start_peer_run (void *cls,
360 * 360 *
361 */ 361 */
362static void 362static void
363start_peer_cleanup (void *cls, 363start_peer_cleanup (void *cls)
364 const struct GNUNET_TESTING_Command *cmd)
365{ 364{
366 struct StartPeerState_v2 *sps = cls; 365 struct StartPeerState_v2 *sps = cls;
367 366
diff --git a/src/transport/transport_api_cmd_stop_peer.c b/src/transport/transport_api_cmd_stop_peer.c
index 4d7228378..dcb982a65 100644
--- a/src/transport/transport_api_cmd_stop_peer.c
+++ b/src/transport/transport_api_cmd_stop_peer.c
@@ -54,14 +54,14 @@ struct StopPeerState
54 */ 54 */
55static void 55static void
56stop_peer_run (void *cls, 56stop_peer_run (void *cls,
57 const struct GNUNET_TESTING_Command *cmd,
58 struct GNUNET_TESTING_Interpreter *is) 57 struct GNUNET_TESTING_Interpreter *is)
59{ 58{
60 struct StopPeerState *stop_ps = cls; 59 struct StopPeerState *stop_ps = cls;
61 struct StartPeerState *sps; 60 struct StartPeerState *sps;
62 const struct GNUNET_TESTING_Command *start_cmd; 61 const struct GNUNET_TESTING_Command *start_cmd;
63 62
64 start_cmd = GNUNET_TESTING_interpreter_lookup_command (stop_ps->start_label); 63 start_cmd = GNUNET_TESTING_interpreter_lookup_command (is,
64 stop_ps->start_label);
65 GNUNET_TRANSPORT_get_trait_state (start_cmd, 65 GNUNET_TRANSPORT_get_trait_state (start_cmd,
66 &sps); 66 &sps);
67 67
@@ -112,8 +112,7 @@ stop_peer_run (void *cls,
112 * 112 *
113 */ 113 */
114static void 114static void
115stop_peer_cleanup (void *cls, 115stop_peer_cleanup (void *cls)
116 const struct GNUNET_TESTING_Command *cmd)
117{ 116{
118 struct StopPeerState *sps = cls; 117 struct StopPeerState *sps = cls;
119 118
@@ -150,14 +149,14 @@ GNUNET_TRANSPORT_cmd_stop_peer (const char *label,
150 149
151 sps = GNUNET_new (struct StopPeerState); 150 sps = GNUNET_new (struct StopPeerState);
152 sps->start_label = start_label; 151 sps->start_label = start_label;
153 152 {
154 struct GNUNET_TESTING_Command cmd = { 153 struct GNUNET_TESTING_Command cmd = {
155 .cls = sps, 154 .cls = sps,
156 .label = label, 155 .label = label,
157 .run = &stop_peer_run, 156 .run = &stop_peer_run,
158 .cleanup = &stop_peer_cleanup, 157 .cleanup = &stop_peer_cleanup,
159 .traits = &stop_peer_traits 158 .traits = &stop_peer_traits
160 }; 159 };
161 160 return cmd;
162 return cmd; 161 }
163} 162}