diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 12:29:16 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 12:29:16 +0000 |
commit | 7b7e5f4ca0c3a0d924283148368dfd07449b170c (patch) | |
tree | 91d2e7f414709d5d86fd73a4e4a4f21c0d111a07 /src/transport/test_transport_blacklisting.c | |
parent | 07ec48898b06b41f6b7598a0c99c3a04c20dbc33 (diff) | |
download | gnunet-7b7e5f4ca0c3a0d924283148368dfd07449b170c.tar.gz gnunet-7b7e5f4ca0c3a0d924283148368dfd07449b170c.zip |
additional test
Diffstat (limited to 'src/transport/test_transport_blacklisting.c')
-rw-r--r-- | src/transport/test_transport_blacklisting.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/transport/test_transport_blacklisting.c b/src/transport/test_transport_blacklisting.c index 8423c641e..b75da26d1 100644 --- a/src/transport/test_transport_blacklisting.c +++ b/src/transport/test_transport_blacklisting.c | |||
@@ -242,6 +242,22 @@ run_stage (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
242 | p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_blacklisting_cfg_blp_peer2_plugin.conf", 2, | 242 | p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_blacklisting_cfg_blp_peer2_plugin.conf", 2, |
243 | NULL, NULL, NULL, &start_cb, NULL); | 243 | NULL, NULL, NULL, &start_cb, NULL); |
244 | } | 244 | } |
245 | else if (0 == strcmp(test_name, "test_transport_blacklisting_multiple_plugins")) | ||
246 | { | ||
247 | p1 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_blacklisting_cfg_blp_peer1_multiple_plugins.conf", 1, | ||
248 | NULL, NULL, NULL, &start_cb, NULL); | ||
249 | |||
250 | p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf", 2, | ||
251 | NULL, NULL, NULL, &start_cb, NULL); | ||
252 | } | ||
253 | |||
254 | |||
255 | if ((NULL == p1) || (NULL == p2)) | ||
256 | { | ||
257 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to start peers\n"); | ||
258 | ok = 1; | ||
259 | GNUNET_SCHEDULER_add_now (&end, NULL); | ||
260 | } | ||
245 | 261 | ||
246 | timeout_task = GNUNET_SCHEDULER_add_delayed (CONNECT_TIMEOUT, &connect_timeout, NULL); | 262 | timeout_task = GNUNET_SCHEDULER_add_delayed (CONNECT_TIMEOUT, &connect_timeout, NULL); |
247 | stage ++; | 263 | stage ++; |
@@ -270,7 +286,8 @@ run_stage (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
270 | (GNUNET_NO == started) ? "NOT STARTED" : "STARTED", | 286 | (GNUNET_NO == started) ? "NOT STARTED" : "STARTED", |
271 | (GNUNET_YES == connected) ? "CONNECTED" : "NOT CONNECTED"); | 287 | (GNUNET_YES == connected) ? "CONNECTED" : "NOT CONNECTED"); |
272 | 288 | ||
273 | if (0 == strcmp(test_name, "test_transport_blacklisting_no_bl")) | 289 | if ((0 == strcmp(test_name, "test_transport_blacklisting_no_bl")) || |
290 | (0 == strcmp(test_name, "test_transport_blacklisting_multiple_plugins"))) | ||
274 | { | 291 | { |
275 | if ((GNUNET_NO != started) && (GNUNET_YES == connected)) | 292 | if ((GNUNET_NO != started) && (GNUNET_YES == connected)) |
276 | ok = 0; | 293 | ok = 0; |