aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_plugin_cmd_udp_backchannel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_transport_plugin_cmd_udp_backchannel.c')
-rw-r--r--src/transport/test_transport_plugin_cmd_udp_backchannel.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/transport/test_transport_plugin_cmd_udp_backchannel.c b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
index ee6dc0274..f3afbec48 100644
--- a/src/transport/test_transport_plugin_cmd_udp_backchannel.c
+++ b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
@@ -58,11 +58,17 @@ struct TestState
58 * 58 *
59 */ 59 */
60 char *cfgname; 60 char *cfgname;
61
62 /**
63 * The complete topology information.
64 */
65 struct GNUNET_TESTING_NetjailTopology *topology;
61}; 66};
62 67
63static struct GNUNET_TESTING_Command block_send; 68static struct GNUNET_TESTING_Command block_send;
64 69
65static struct GNUNET_TESTING_Command connect_peers; 70static struct GNUNET_TESTING_Command connect_peers;
71
66static struct GNUNET_TESTING_Command local_prepared; 72static struct GNUNET_TESTING_Command local_prepared;
67 73
68 74
@@ -110,7 +116,8 @@ all_peers_started ()
110 116
111 GNUNET_TESTING_get_trait_async_context (&block_send, 117 GNUNET_TESTING_get_trait_async_context (&block_send,
112 &ac); 118 &ac);
113 if ((NULL == ac) || (NULL == ac->cont)) 119 GNUNET_assert (NULL != ac);
120 if ((NULL == ac->cont))
114 GNUNET_TESTING_async_fail (ac); 121 GNUNET_TESTING_async_fail (ac);
115 else 122 else
116 GNUNET_TESTING_async_finish (ac); 123 GNUNET_TESTING_async_finish (ac);
@@ -142,6 +149,7 @@ handle_result (void *cls,
142 149
143 GNUNET_free (ts->testdir); 150 GNUNET_free (ts->testdir);
144 GNUNET_free (ts->cfgname); 151 GNUNET_free (ts->cfgname);
152 GNUNET_TESTING_free_topology (ts->topology);
145 GNUNET_free (ts); 153 GNUNET_free (ts);
146} 154}
147 155
@@ -174,10 +182,11 @@ static void
174all_local_tests_prepared () 182all_local_tests_prepared ()
175{ 183{
176 struct LocalPreparedState *lfs; 184 struct LocalPreparedState *lfs;
185
177 GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, 186 GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared,
178 &lfs); 187 &lfs);
179 188 GNUNET_assert (NULL != &lfs->ac);
180 if ((NULL == &lfs->ac) || (NULL == lfs->ac.cont)) 189 if (NULL == lfs->ac.cont)
181 GNUNET_TESTING_async_fail (&lfs->ac); 190 GNUNET_TESTING_async_fail (&lfs->ac);
182 else 191 else
183 GNUNET_TESTING_async_finish (&lfs->ac); 192 GNUNET_TESTING_async_finish (&lfs->ac);
@@ -210,6 +219,8 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip,
210 struct GNUNET_TESTING_NetjailTopology *topology = 219 struct GNUNET_TESTING_NetjailTopology *topology =
211 GNUNET_TESTING_get_topo_from_file (TOPOLOGY_CONFIG); 220 GNUNET_TESTING_get_topo_from_file (TOPOLOGY_CONFIG);
212 221
222 ts->topology = topology;
223
213 sscanf (m, "%u", &m_int); 224 sscanf (m, "%u", &m_int);
214 sscanf (n, "%u", &n_int); 225 sscanf (n, "%u", &n_int);
215 sscanf (local_m, "%u", &local_m_int); 226 sscanf (local_m, "%u", &local_m_int);