From 18656ea25708198199589ac8c32c360f2ee1a544 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 20 Jun 2012 15:14:44 +0000 Subject: -fixes for api change in testing library --- src/datastore/perf_datastore_api.c | 3 ++- src/datastore/test_datastore_api.c | 3 ++- src/datastore/test_datastore_api_management.c | 3 ++- src/fs/test_fs_download.c | 3 ++- src/fs/test_fs_download_indexed.c | 3 ++- src/fs/test_fs_download_persistence.c | 3 ++- src/fs/test_fs_list_indexed.c | 3 ++- src/fs/test_fs_namespace.c | 3 ++- src/fs/test_fs_namespace_list_updateable.c | 3 ++- src/fs/test_fs_publish.c | 3 ++- src/fs/test_fs_publish_persistence.c | 3 ++- src/fs/test_fs_search.c | 3 ++- src/fs/test_fs_search_persistence.c | 3 ++- src/fs/test_fs_search_probes.c | 3 ++- src/fs/test_fs_start_stop.c | 3 ++- src/fs/test_fs_unindex.c | 3 ++- src/fs/test_fs_unindex_persistence.c | 3 ++- src/lockmanager/test_lockmanager_api.c | 9 ++++----- src/nse/test_nse_api.c | 3 ++- src/stream/test_stream_big.c | 14 +++++++------- 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 static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { struct CpsRunContext *crc; 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 static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { struct CpsRunContext *crc; 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 static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { struct CpsRunContext *crc; 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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *c) + const struct GNUNET_CONFIGURATION_Handle *c, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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 () static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL, 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 () static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL, 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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *c) + const struct GNUNET_CONFIGURATION_Handle *c, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *c) + const struct GNUNET_CONFIGURATION_Handle *c, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { struct GNUNET_FS_Handle *fs; 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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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) static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *c) + const struct GNUNET_CONFIGURATION_Handle *c, + struct GNUNET_TESTING_Peer *peer) { const char *keywords[] = { "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, static void run (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, - const struct GNUNET_TESTING_Peer *peer) + struct GNUNET_TESTING_Peer *peer) { LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting test...\n"); config = cfg; @@ -201,10 +201,9 @@ run (void *cls, int main (int argc, char **argv) { - if (0 != GNUNET_TESTING_service_run_restartable ("test_lockmanager_api", - "arm", - "test_lockmanager_api.conf", - &run, NULL)) + if (0 != GNUNET_TESTING_peer_run ("test_lockmanager_api", + "test_lockmanager_api.conf", + &run, NULL)) return 1; return (TEST_FAIL == result) ? 1 : 0; } 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, static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { die_task = 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) GNUNET_SCHEDULER_cancel (abort_task); } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Wait\n"); + GNUNET_SCHEDULER_shutdown (); } @@ -306,8 +307,8 @@ stream_read_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) */ static int stream_listen_cb (void *cls, - struct GNUNET_STREAM_Socket *socket, - const struct GNUNET_PeerIdentity *initiator) + struct GNUNET_STREAM_Socket *socket, + const struct GNUNET_PeerIdentity *initiator) { GNUNET_assert (NULL != socket); GNUNET_assert (socket != peer1.socket); @@ -354,7 +355,7 @@ stream_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) static void run (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, - const struct GNUNET_TESTING_Peer *peer) + struct GNUNET_TESTING_Peer *peer) { struct GNUNET_PeerIdentity self; @@ -380,10 +381,9 @@ run (void *cls, */ int main (int argc, char **argv) { - if (0 != GNUNET_TESTING_service_run_restartable ("test-stream-big", - "arm", - "test_stream_local.conf", - &run, NULL)) + if (0 != GNUNET_TESTING_peer_run ("test-stream-big", + "test_stream_local.conf", + &run, NULL)) return 1; return (GNUNET_SYSERR == result) ? 1 : 0; } 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 () static void run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg) + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Peer *peer) { struct in_addr v4; struct in6_addr v6; -- cgit v1.2.3