diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-20 15:14:44 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-20 15:14:44 +0000 |
commit | 18656ea25708198199589ac8c32c360f2ee1a544 (patch) | |
tree | 817dc1fe18dc53fe70bc647f0383cdd7d403af59 /src | |
parent | a2cd9dd7848a038d7006c4766ced886c9538c956 (diff) | |
download | gnunet-18656ea25708198199589ac8c32c360f2ee1a544.tar.gz gnunet-18656ea25708198199589ac8c32c360f2ee1a544.zip |
-fixes for api change in testing library
Diffstat (limited to 'src')
-rw-r--r-- | src/datastore/perf_datastore_api.c | 3 | ||||
-rw-r--r-- | src/datastore/test_datastore_api.c | 3 | ||||
-rw-r--r-- | src/datastore/test_datastore_api_management.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_download.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_download_indexed.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_download_persistence.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_list_indexed.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_namespace.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_namespace_list_updateable.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_publish.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_publish_persistence.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_search.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_search_persistence.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_search_probes.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_start_stop.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_unindex.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_unindex_persistence.c | 3 | ||||
-rw-r--r-- | src/lockmanager/test_lockmanager_api.c | 9 | ||||
-rw-r--r-- | src/nse/test_nse_api.c | 3 | ||||
-rw-r--r-- | src/stream/test_stream_big.c | 14 | ||||
-rw-r--r-- | src/vpn/test_gnunet_vpn.c | 3 |
21 files changed, 49 insertions, 31 deletions
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index 6b7a73640..b690610f5 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c | |||
@@ -295,7 +295,8 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c | |||
295 | 295 | ||
296 | static void | 296 | static void |
297 | run (void *cls, | 297 | run (void *cls, |
298 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 298 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
299 | struct GNUNET_TESTING_Peer *peer) | ||
299 | { | 300 | { |
300 | struct CpsRunContext *crc; | 301 | struct CpsRunContext *crc; |
301 | static struct GNUNET_HashCode zkey; | 302 | static struct GNUNET_HashCode zkey; |
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c index 3f8f87cae..15e6afa4a 100644 --- a/src/datastore/test_datastore_api.c +++ b/src/datastore/test_datastore_api.c | |||
@@ -464,7 +464,8 @@ run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiratio | |||
464 | 464 | ||
465 | static void | 465 | static void |
466 | run (void *cls, | 466 | run (void *cls, |
467 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 467 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
468 | struct GNUNET_TESTING_Peer *peer) | ||
468 | { | 469 | { |
469 | struct CpsRunContext *crc; | 470 | struct CpsRunContext *crc; |
470 | static struct GNUNET_HashCode zkey; | 471 | static struct GNUNET_HashCode zkey; |
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c index 4766c03eb..b8f042e50 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c | |||
@@ -259,7 +259,8 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c | |||
259 | 259 | ||
260 | static void | 260 | static void |
261 | run (void *cls, | 261 | run (void *cls, |
262 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 262 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
263 | struct GNUNET_TESTING_Peer *peer) | ||
263 | { | 264 | { |
264 | struct CpsRunContext *crc; | 265 | struct CpsRunContext *crc; |
265 | static struct GNUNET_HashCode zkey; | 266 | static struct GNUNET_HashCode zkey; |
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index 51c7a4000..6d3ccff6e 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c | |||
@@ -232,7 +232,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
232 | 232 | ||
233 | static void | 233 | static void |
234 | run (void *cls, | 234 | run (void *cls, |
235 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 235 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
236 | struct GNUNET_TESTING_Peer *peer) | ||
236 | { | 237 | { |
237 | const char *keywords[] = { | 238 | const char *keywords[] = { |
238 | "down_foo", | 239 | "down_foo", |
diff --git a/src/fs/test_fs_download_indexed.c b/src/fs/test_fs_download_indexed.c index 2d4091d7a..fc50fa975 100644 --- a/src/fs/test_fs_download_indexed.c +++ b/src/fs/test_fs_download_indexed.c | |||
@@ -232,7 +232,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
232 | 232 | ||
233 | static void | 233 | static void |
234 | run (void *cls, | 234 | run (void *cls, |
235 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 235 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
236 | struct GNUNET_TESTING_Peer *peer) | ||
236 | { | 237 | { |
237 | const char *keywords[] = { | 238 | const char *keywords[] = { |
238 | "down_foo", | 239 | "down_foo", |
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index 98a32af5f..a5f014db5 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c | |||
@@ -277,7 +277,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
277 | 277 | ||
278 | static void | 278 | static void |
279 | run (void *cls, | 279 | run (void *cls, |
280 | const struct GNUNET_CONFIGURATION_Handle *c) | 280 | const struct GNUNET_CONFIGURATION_Handle *c, |
281 | struct GNUNET_TESTING_Peer *peer) | ||
281 | { | 282 | { |
282 | const char *keywords[] = { | 283 | const char *keywords[] = { |
283 | "down_foo", | 284 | "down_foo", |
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c index 2b53bc5a4..3166bf980 100644 --- a/src/fs/test_fs_list_indexed.c +++ b/src/fs/test_fs_list_indexed.c | |||
@@ -170,7 +170,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
170 | 170 | ||
171 | static void | 171 | static void |
172 | run (void *cls, | 172 | run (void *cls, |
173 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 173 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
174 | struct GNUNET_TESTING_Peer *peer) | ||
174 | { | 175 | { |
175 | const char *keywords[] = { | 176 | const char *keywords[] = { |
176 | "down_foo", | 177 | "down_foo", |
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c index 7f0a53344..69fead2d6 100644 --- a/src/fs/test_fs_namespace.c +++ b/src/fs/test_fs_namespace.c | |||
@@ -318,7 +318,8 @@ testNamespace () | |||
318 | 318 | ||
319 | static void | 319 | static void |
320 | run (void *cls, | 320 | run (void *cls, |
321 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 321 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
322 | struct GNUNET_TESTING_Peer *peer) | ||
322 | { | 323 | { |
323 | fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL, | 324 | fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL, |
324 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); | 325 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); |
diff --git a/src/fs/test_fs_namespace_list_updateable.c b/src/fs/test_fs_namespace_list_updateable.c index 50668cac3..10e5c9be7 100644 --- a/src/fs/test_fs_namespace_list_updateable.c +++ b/src/fs/test_fs_namespace_list_updateable.c | |||
@@ -151,7 +151,8 @@ testNamespace () | |||
151 | 151 | ||
152 | static void | 152 | static void |
153 | run (void *cls, | 153 | run (void *cls, |
154 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 154 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
155 | struct GNUNET_TESTING_Peer *peer) | ||
155 | { | 156 | { |
156 | fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL, | 157 | fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL, |
157 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); | 158 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); |
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c index 47a604c1d..622dd5a42 100644 --- a/src/fs/test_fs_publish.c +++ b/src/fs/test_fs_publish.c | |||
@@ -154,7 +154,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
154 | 154 | ||
155 | static void | 155 | static void |
156 | run (void *cls, | 156 | run (void *cls, |
157 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 157 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
158 | struct GNUNET_TESTING_Peer *peer) | ||
158 | { | 159 | { |
159 | const char *keywords[] = { | 160 | const char *keywords[] = { |
160 | "down_foo", | 161 | "down_foo", |
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index cbe859531..985732739 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c | |||
@@ -219,7 +219,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
219 | 219 | ||
220 | static void | 220 | static void |
221 | run (void *cls, | 221 | run (void *cls, |
222 | const struct GNUNET_CONFIGURATION_Handle *c) | 222 | const struct GNUNET_CONFIGURATION_Handle *c, |
223 | struct GNUNET_TESTING_Peer *peer) | ||
223 | { | 224 | { |
224 | const char *keywords[] = { | 225 | const char *keywords[] = { |
225 | "down_foo", | 226 | "down_foo", |
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c index 1ae84a8d0..9a6ba90a4 100644 --- a/src/fs/test_fs_search.c +++ b/src/fs/test_fs_search.c | |||
@@ -153,7 +153,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
153 | 153 | ||
154 | static void | 154 | static void |
155 | run (void *cls, | 155 | run (void *cls, |
156 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 156 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
157 | struct GNUNET_TESTING_Peer *peer) | ||
157 | { | 158 | { |
158 | const char *keywords[] = { | 159 | const char *keywords[] = { |
159 | "down_foo", | 160 | "down_foo", |
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index cedf4b8a5..e2f97a5e1 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c | |||
@@ -214,7 +214,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
214 | 214 | ||
215 | static void | 215 | static void |
216 | run (void *cls, | 216 | run (void *cls, |
217 | const struct GNUNET_CONFIGURATION_Handle *c) | 217 | const struct GNUNET_CONFIGURATION_Handle *c, |
218 | struct GNUNET_TESTING_Peer *peer) | ||
218 | { | 219 | { |
219 | const char *keywords[] = { | 220 | const char *keywords[] = { |
220 | "down_foo", | 221 | "down_foo", |
diff --git a/src/fs/test_fs_search_probes.c b/src/fs/test_fs_search_probes.c index be710a79c..814eb348d 100644 --- a/src/fs/test_fs_search_probes.c +++ b/src/fs/test_fs_search_probes.c | |||
@@ -156,7 +156,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
156 | 156 | ||
157 | static void | 157 | static void |
158 | run (void *cls, | 158 | run (void *cls, |
159 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 159 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
160 | struct GNUNET_TESTING_Peer *peer) | ||
160 | { | 161 | { |
161 | const char *keywords[] = { | 162 | const char *keywords[] = { |
162 | "down_foo", | 163 | "down_foo", |
diff --git a/src/fs/test_fs_start_stop.c b/src/fs/test_fs_start_stop.c index f3dff69f6..a1f595a2d 100644 --- a/src/fs/test_fs_start_stop.c +++ b/src/fs/test_fs_start_stop.c | |||
@@ -38,7 +38,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
38 | 38 | ||
39 | static void | 39 | static void |
40 | run (void *cls, | 40 | run (void *cls, |
41 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 41 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
42 | struct GNUNET_TESTING_Peer *peer) | ||
42 | { | 43 | { |
43 | struct GNUNET_FS_Handle *fs; | 44 | struct GNUNET_FS_Handle *fs; |
44 | 45 | ||
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index 52e1845a7..0ff22ab29 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c | |||
@@ -168,7 +168,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
168 | 168 | ||
169 | static void | 169 | static void |
170 | run (void *cls, | 170 | run (void *cls, |
171 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 171 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
172 | struct GNUNET_TESTING_Peer *peer) | ||
172 | { | 173 | { |
173 | const char *keywords[] = { | 174 | const char *keywords[] = { |
174 | "down_foo", | 175 | "down_foo", |
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index 8f4364c28..dba9d23d6 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c | |||
@@ -231,7 +231,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
231 | 231 | ||
232 | static void | 232 | static void |
233 | run (void *cls, | 233 | run (void *cls, |
234 | const struct GNUNET_CONFIGURATION_Handle *c) | 234 | const struct GNUNET_CONFIGURATION_Handle *c, |
235 | struct GNUNET_TESTING_Peer *peer) | ||
235 | { | 236 | { |
236 | const char *keywords[] = { | 237 | const char *keywords[] = { |
237 | "down_foo", | 238 | "down_foo", |
diff --git a/src/lockmanager/test_lockmanager_api.c b/src/lockmanager/test_lockmanager_api.c index 4cc745401..91772e39c 100644 --- a/src/lockmanager/test_lockmanager_api.c +++ b/src/lockmanager/test_lockmanager_api.c | |||
@@ -177,7 +177,7 @@ status_cb (void *cls, | |||
177 | static void | 177 | static void |
178 | run (void *cls, | 178 | run (void *cls, |
179 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 179 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
180 | const struct GNUNET_TESTING_Peer *peer) | 180 | struct GNUNET_TESTING_Peer *peer) |
181 | { | 181 | { |
182 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting test...\n"); | 182 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting test...\n"); |
183 | config = cfg; | 183 | config = cfg; |
@@ -201,10 +201,9 @@ run (void *cls, | |||
201 | int main (int argc, char **argv) | 201 | int main (int argc, char **argv) |
202 | { | 202 | { |
203 | 203 | ||
204 | if (0 != GNUNET_TESTING_service_run_restartable ("test_lockmanager_api", | 204 | if (0 != GNUNET_TESTING_peer_run ("test_lockmanager_api", |
205 | "arm", | 205 | "test_lockmanager_api.conf", |
206 | "test_lockmanager_api.conf", | 206 | &run, NULL)) |
207 | &run, NULL)) | ||
208 | return 1; | 207 | return 1; |
209 | return (TEST_FAIL == result) ? 1 : 0; | 208 | return (TEST_FAIL == result) ? 1 : 0; |
210 | } | 209 | } |
diff --git a/src/nse/test_nse_api.c b/src/nse/test_nse_api.c index c71d9161c..01fdb406e 100644 --- a/src/nse/test_nse_api.c +++ b/src/nse/test_nse_api.c | |||
@@ -77,7 +77,8 @@ check_nse_message (void *cls, struct GNUNET_TIME_Absolute timestamp, | |||
77 | 77 | ||
78 | static void | 78 | static void |
79 | run (void *cls, | 79 | run (void *cls, |
80 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 80 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
81 | struct GNUNET_TESTING_Peer *peer) | ||
81 | { | 82 | { |
82 | die_task = | 83 | die_task = |
83 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 84 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
diff --git a/src/stream/test_stream_big.c b/src/stream/test_stream_big.c index 03dec7c3d..6815ae665 100644 --- a/src/stream/test_stream_big.c +++ b/src/stream/test_stream_big.c | |||
@@ -102,6 +102,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
102 | GNUNET_SCHEDULER_cancel (abort_task); | 102 | GNUNET_SCHEDULER_cancel (abort_task); |
103 | } | 103 | } |
104 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Wait\n"); | 104 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Wait\n"); |
105 | GNUNET_SCHEDULER_shutdown (); | ||
105 | } | 106 | } |
106 | 107 | ||
107 | 108 | ||
@@ -306,8 +307,8 @@ stream_read_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
306 | */ | 307 | */ |
307 | static int | 308 | static int |
308 | stream_listen_cb (void *cls, | 309 | stream_listen_cb (void *cls, |
309 | struct GNUNET_STREAM_Socket *socket, | 310 | struct GNUNET_STREAM_Socket *socket, |
310 | const struct GNUNET_PeerIdentity *initiator) | 311 | const struct GNUNET_PeerIdentity *initiator) |
311 | { | 312 | { |
312 | GNUNET_assert (NULL != socket); | 313 | GNUNET_assert (NULL != socket); |
313 | GNUNET_assert (socket != peer1.socket); | 314 | GNUNET_assert (socket != peer1.socket); |
@@ -354,7 +355,7 @@ stream_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
354 | static void | 355 | static void |
355 | run (void *cls, | 356 | run (void *cls, |
356 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 357 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
357 | const struct GNUNET_TESTING_Peer *peer) | 358 | struct GNUNET_TESTING_Peer *peer) |
358 | { | 359 | { |
359 | struct GNUNET_PeerIdentity self; | 360 | struct GNUNET_PeerIdentity self; |
360 | 361 | ||
@@ -380,10 +381,9 @@ run (void *cls, | |||
380 | */ | 381 | */ |
381 | int main (int argc, char **argv) | 382 | int main (int argc, char **argv) |
382 | { | 383 | { |
383 | if (0 != GNUNET_TESTING_service_run_restartable ("test-stream-big", | 384 | if (0 != GNUNET_TESTING_peer_run ("test-stream-big", |
384 | "arm", | 385 | "test_stream_local.conf", |
385 | "test_stream_local.conf", | 386 | &run, NULL)) |
386 | &run, NULL)) | ||
387 | return 1; | 387 | return 1; |
388 | return (GNUNET_SYSERR == result) ? 1 : 0; | 388 | return (GNUNET_SYSERR == result) ? 1 : 0; |
389 | } | 389 | } |
diff --git a/src/vpn/test_gnunet_vpn.c b/src/vpn/test_gnunet_vpn.c index 78bea39a7..d2cfc757b 100644 --- a/src/vpn/test_gnunet_vpn.c +++ b/src/vpn/test_gnunet_vpn.c | |||
@@ -374,7 +374,8 @@ mhd_main () | |||
374 | 374 | ||
375 | static void | 375 | static void |
376 | run (void *cls, | 376 | run (void *cls, |
377 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 377 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
378 | struct GNUNET_TESTING_Peer *peer) | ||
378 | { | 379 | { |
379 | struct in_addr v4; | 380 | struct in_addr v4; |
380 | struct in6_addr v6; | 381 | struct in6_addr v6; |